Monday, March 05, 2007

getSnapshot(java.lang.String imageType) in mmapi

getSnapshot(java.lang.String imageType) returns a byte array which is encoded with given imageType.If imageType is null then default image type will be used.

How to learn supported image types?

System.out.println(System.getProperty("video.snapshot.encodings"));

Getting a jpeg image

byte[] imageData = videoControl.getSnapshot("encoding=jpeg"); //160x120
byte[] imageData = videoControl.getSnapshot("encoding=jpeg width="200" height="150");

Getting a png image

byte[] imageData = videoControl.getSnapshot("encoding=png"); //160x120

image types

http://en.wikipedia.org/wiki/Png

A good comparison of snapshot speed of the Nokia 6600 in different image types



2 comments:

Raja Nagendra Kumar said...

All the Parameters of getsnapshot should be seperated by & and not by space..

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

Sezer Akar said...

Thanks for your comment.

Best Regards.