I have a need to capture an image using the phone's camera in my application. I am using LWUIT for my UI and so I start the view finder like so as suggested by the documentation:
To capture the image, I do:
m_videoComponent = VideoComponent.createVideoPeer("capture://image");
m_player = (Player) m_videoComponent.getNativePeer();
Now this works ok. However, my requirement is to capture an image using a higher resolution that is supported by the device. However, from what I have noticed, the getSnapshot method seems to only return an image the size of the device screen (as if it was just taking a screenshot) as opposed to a higher image resolution that is supported by the device. I've read in some forums that it is possible to set the desired capture resolution like this:
VideoControl videoControl = (VideoControl) m_castedForm.getPlayer().getControl("VideoControl");
byte img = videoControl.getSnapshot(null);
or by passing it as an argument in the getSnapshot like this
cameraControl = (CameraControl)player.getControl("CameraControl");
However, none of them seemed to work. Getting the CameraControl would always return null and passing the size argument in the getSnapshot method would throw an exception saying that it is not supported.
byte imageData = vc.getSnapshot(“width=120&height=90”);
So my question is, can LWUIT's video component capture an image of a higher resolution? If so, how can this be done?
Thank you in advance!