Hi,

Can any one tell me how can i take a camera snapshot using nokia ui api?

If i use videocontrol(JSR-135) for viewing viewfinder of camera to a canvas,How can i get pixels from canvas?

***********************************
Player p;
VideoControl vc;

// initialize camera
try {
p = Manager.createPlayer("capture://video");
p.realize();

// Grab the video control and set it to the current display.
vc = (VideoControl)p.getControl("VideoControl");
if (vc != null) {
Form form = new Form("video");
form.append((Item)vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null));
Display.getDisplay(midlet).setCurrent(form);
}

p.start();

byte[] image = vc.getSnapshot(null);

// do something with the image ...

} catch (IOException ioe) {
} catch (MediaException me) { }
***********************************

I use the above method to take a snapshot.But the problem is, it is slow. I am developing a auto application that will take snapshot continiously etc.... That's why i need to take snapshot speedily. I hear that it can be possible by getpixels of nokia UI api. But i can't figure out how.

If any give me some code or example on taking snapshot using api it will be a great help for me.

Pls help me as soon as possible.

Mahabubul Alam
mahabublink@yahoo.com