Discussion Board

Results 1 to 11 of 11
  1. #1
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Hi People,

    I am working on an application for S40 that uses the camera for reading QR Codes and I have tried to obtain higher resolutions pictures using the SDK 2.0/emulator.
    However, the image is always 240x320 (the screen size), no matter what I do.

    Some facts:

    - getSnapshot() only works with null parameter, if I try to add picture sizes or image formats I have an exception
    - yes, I used "System.getProperty("video.snapshot.encodings");" before to check available encodings. The response is "image/jpeg" but it is not accepted by getSnapshot()

    Is this a problem with S40 emulator ? I will try to use a real device from today but any feedback on this issue is welcome.

    Posts/Wiki entries that I have read:

    http://www.developer.nokia.com/Commu...ure_in_Java_ME
    http://www.developer.nokia.com/Commu...hlight=picture size
    http://www.developer.nokia.com/Commu...hlight=picture size
    http://www.developer.nokia.com/Commu...hlight=picture size
    http://www.developer.nokia.com/Commu...ht=getsnapshot
    http://www.developer.nokia.com/Commu...ht=getsnapshot
    http://www.developer.nokia.com/Commu...ht=getsnapshot
    http://www.developer.nokia.com/Commu...ht=getsnapshot asha

  2. #2
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Silence ... bad sign

    Could anyone confirm that getSnapshot() works with parameters on real ASHA devices (311, for example) ?

    Marcelo

    PS: Sorry for the wrong place. I started a message talking about media but it changed during writing and I finished up talking about emulator

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,430

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Silence is not always a bad sign! There should be some thing cooking in the back ground!

    I wanted to try this, but got busy with some thing else. In the mean while, I checked and got confirmed that in emulator it supports only 240x320, but in the real device you can get higher resolutions.

    Regards
    Gopal

  4. #4
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Hi Gopal

    Quote Originally Posted by balagopalks View Post
    Silence is not always a bad sign! There should be some thing cooking in the back ground!
    Never, but never, underestimate a champion ...

    Quote Originally Posted by balagopalks View Post
    I wanted to try this, but got busy with some thing else. In the mean while, I checked and got confirmed that in emulator it supports only 240x320, but in the real device you can get higher resolutions.l
    I had time to test it, finally. It seems some emulator limitation at the end.
    My Asha 311 is working with additional parameters for getSnapshot().

    Thanks, Gopal.

    Marcelo

  5. #5
    Registered User
    Join Date
    Sep 2012
    Location
    Timisoara, Romania
    Posts
    19

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Maybe because the emulator is actually Asha 305 ?

  6. #6
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,430

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Quote Originally Posted by Adi.Stoicuta View Post
    Maybe because the emulator is actually Asha 305 ?
    The confirmation I have got from SDK team is, from the Emulator, captured images will be of size 240x320 - its the expected behaviour.

    Regards
    Gopal

  7. #7
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Quote Originally Posted by balagopalks View Post
    The confirmation I have got from SDK team is, from the Emulator, captured images will be of size 240x320 - its the expected behaviour.
    l
    Great, Gopal. Now it is crystal clear.
    Thanks a lot.

  8. #8
    Registered User
    Join Date
    Feb 2005
    Location
    Campina Grande/PB - Brazil
    Posts
    138

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Hello Marcelo, hopefully not too late =)
    I made a simple example and tested on Nokia X3-02 ​​and Asha 305.

    byte [] imageData = videoControl.getSnapshot ("encoding = jpeg & quality = 100 & width = 640 & height = 480");

    I got a satisfactory result but strange:
    In the X3-02: only VGA (640x480), with higher resolutions the app crashed;
    In the Asha 305: images with 400x300 pixels (even putting 640x480) and 1.2MP (1280x960) ...

    I'll do more tests and try to see what is happening and try to at least VGA resolution in all devices, because I believe that for simplest devices, larger images will be a problem because of the device memory.

  9. #9
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,430

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    @TK2000 - I guess the higher resolutions crashed may be because of OutOfMemory ? Does it crash with any exception ?

    Regards
    Gopal

  10. #10
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    Thanks a lot TK2000 !

    It is likely that you have an "out of memory problem" when the app crashes.
    About the different resolutions: the phone can choose the nearest (lower) resolutions if the specified it is not found.

  11. #11
    Registered User
    Join Date
    Jan 2014
    Posts
    1

    Re: getSnapshot() with different image resolutions on SDK2.0 not working in emulator

    running in emulator for asha 502.. Asha SDK 1.1
    trying to capture image in VGA and larger sizes..

    javax.microedition.media.MediaException: Snapshot format ('encoding=jpeg&height=640&width=480')is not supported
    Here is how it is being called videoControl.getSnapshot("encoding=jpeg&height=640&width=480")
    videoControl.getSnapshot("encoding=jpeg") works, but gives 320x240 image

    System.out.println(System.getProperty("video.snapshot.encodings"));
    returns
    encoding=jpeg

    Any pointers!!

Similar Threads

  1. getSnapShot blank image
    By iit-developer in forum Mobile Java Media (Graphics & Sounds)
    Replies: 9
    Last Post: 2010-05-06, 11:24
  2. Replies: 17
    Last Post: 2009-01-08, 13:10
  3. jsr135 highest supported camera resolutions for getSnapShot() on N95
    By garyjamessilva in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2007-05-30, 21:14
  4. S60_3rd_FP1 Emulator Resolutions
    By ckasek in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-12-20, 19:38

Posting Permissions

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