Hi,
I tried capturing the image using the MMAPI, following is the code written for it,
try
{
p = Manager.createPlayer("capture://video");
p.realize();
if ((vc = (VideoControl)p.getControl("VideoControl")) != null)
{
vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
vc.setDisplayLocation(0, 0);
vc.setDisplaySize(width , height);
vc.setVisible(true);
}
p.start();
}catch(Exception e)
{
//System.out.println("Comming here in media");
}
after pressing capture command i have written
byte[] xyz = vc.getSnapshot(null);
Image image = Image.createImage(xyz, 0, xyz.length);
Capturing works fine but problem is when i display the captured image it displays the image which is not captured at the insance when i clicked capture command. Like the captured picture will be of the previous frames.
Regds,
J2me@com

Reply With Quote


