You Are Here:

Community: Developer Discussion Boards

#1 Old Take a Camera snapshot using nokia UI Api - 2007-04-24, 16:59

Join Date: Mar 2007
Posts: 6
mahabubul_alam
Offline
Registered User
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
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Nokia PC Connectivity能否链接到cdma手机上发送短信和其他操作? bborn Web Technologies and Multimedia Content- Web 技术和多媒体内容 2 2004-05-04 12:06
Nokia Image Converter davidpurdie General Discussion 0 2004-02-18 16:31

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia