Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 08:30, 25 September 2007.

How to display the camera & take snapshots in Java ME

From Forum Nokia Wiki

(Redirected from Talk:Testing)


The following code is used for camera display:

public void cameraPlayer() {
    try {
        player = Manager.createPlayer("capture://video");
        player.realize();
            
        videoControl = (VideoControl)player.getControl("VideoControl");
        player.start();
    } catch (Exception e) {} 
}


The following code is used for capturing images using camera in Java ME:

byte[] raw = videoControl .getSnapshot(null);
Image image = Image.createImage(raw, 0, raw.length);

TODO: list available modes, and when you need to use a different locator

helpful links:

http://developers.sun.com/techtopics/mobility/midp/articles/picture/ http://www.java-tips.org/java-me-tips/midp/capturing-video-on-j2me-devices.html

 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZjavaQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX