05-15-2012, 04:26 AM
|
#1 (permalink)
|
| Knows Where the Search Button Is
Join Date: May 2011 Model: 9800 PIN: N/A Carrier: blackberry
Posts: 22
Post Thanks: 1 Thanked 0 Times in 0 Posts
| capture image programmatically Please Login to Remove! hello
i am trying to capture an image using a background thread without open any screen.....
using following code this code is working fine but i want to do all process in a background thread:
cameraPlayer = Manager
.createPlayer("capture://video?encoding=jpeg");
cameraPlayer.start();
// cameraPlayer.realize();
videoControl = (VideoControl) cameraPlayer
.getControl("VideoControl");
_videoField = (Field) videoControl.initDisplayMode(VideoControl.USE_GUI_ PRIMITIVE,
"net.rim.device.api.ui.Field");
add(_videoField);
Thread.sleep(1000);
String encoding = null;
if (_encodings != null) {
// Use the user-selected encoding instead.
encoding = _encodings[1].getFullEncoding();
}
byte[] imageByte = videoControl.getSnapshot(encoding);
Thanx |
| Offline
| |