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

Please note that as of October 24, 2014, we will be archiving some of the Nokia Developer discussion boards. The Nokia Asha and Nokia X sections will remain open for continued use. The "Windows Phone/Lumia" and "Other Platforms" sections will become read-only. For your Windows Phone development questions, we invite you to visit the Microsoft Developer Network (MSDN) discussion forums.

If this is your first visit, be sure to check out the FAQ. To start viewing messages, select the forum that you want to visit from the selection below.

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.

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.

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

Hi Gopal

Originally Posted by balagopalks

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

Never, but never, underestimate a champion ...

Originally Posted by balagopalks

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

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.

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

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