I'm having a hard time taking snapshots using MMAPI from Nokia S60 phones. For some strange reason, all pictures are incomplete. Just the upper part shows. The code works fine on S40 (at least as long as I don't up the resolution too much). The area where the picture doesn't show is pure white.
This is my code:
It might be wise to mention that I send the data over HTTP. For the interested, PHP receives the data and I can find a lot of the following in the PHP error log:
currentPlayer = Manager.createPlayer(LocalConfig.getURL_IMAGE_CAPTURE());
currentVideoControl = (VideoControl)currentPlayer.getControl(NAME_VIDEO_CONTROL);
videoControlGUIItem = (Item)currentVideoControl.initDisplayMode(currentVideoControl.USE_GUI_PRIMITIVE, null);
data = currentVideoControl.getSnapshot(null);
currentPlayer = null;
videoControlGUIItem = null;
currentVideoControl = null;
On S40, if I don't use getSnapshot(null) but select a resolution, too high resolution gives large grey areas on the image (PHP error log reports "premature end of JPEG").
PHP Warning: imagecreatefromstring(): gd-png: fatal libpng error: Read Error: truncated data in ..... on line 25
PHP Warning: imagecreatefromstring(): gd-png error: setjmp returns error condition in ... on line 25
PHP Warning: imagecreatefromstring(): Passed data is not in 'PNG' format in .... on line 25
Any help on this would be greatly appreciated, I have no clue as to what's wrong. If I try to resend, the same error occurs. So I'm pretty sure it isn't the transfer (other phones work just fine).