Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2010

    Exclamation Incomplete images using getSnapshot(..) on S60


    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:

    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;
    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:

    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
    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").

    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).

  2. #2
    Registered User
    Join Date
    Oct 2009

    Re: Incomplete images using getSnapshot(..) on S60

    Try using this simple code on your device and see...


Similar Threads

  1. S60 slider incomplete resource causes out of memory failure
    By Gingah in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-08-17, 14:04
  2. Broken images from getsnapshot()
    By zxcn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2006-10-17, 10:19
  3. Listing files/images on an S60
    By uh...ok in forum Symbian
    Replies: 1
    Last Post: 2004-06-02, 07:52
  4. Images on 3650 vs other S60 devices
    By Stengun in forum Mobile Java General
    Replies: 1
    Last Post: 2004-05-11, 21:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts