Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
bog
Contributor
Posts: 35
Registered: ‎05-11-2011
My Device: 9800
My Carrier: bell
Accepted Solution

screenshot an image, but it is blank

I have a problem in taking a picture from screen.

 

I record video from camera and paly it on screen. I can use videoControl.getSnapshot() to get an image, but since  I do not want the sound goes with the function, I tried to use Display.screenshot(). However, 

 

Bitmap screenbmp = new Bitmap(Display.getWidth(), Display.getHeight());        

Display.screenshot(screenbmp); 

 

It only capture the background, basically a pure white image while the video is playing on screen. It also make the screen flush white periodcally since I am trigger the function every a few seconds.

 

Anyone can help me figure out what is wrong or give some hints? I appreicite your time and help!

 

 

bog
Contributor
Posts: 35
Registered: ‎05-11-2011
My Device: 9800
My Carrier: bell

Re: screenshot an image, but it is blank

I push screen twice, the first screen is an user interface, the second screen is the video. Does it has something to do with it? Do I need to get focus on the second screen before I use display.screenshot? 

Highlighted
bog
Contributor
Posts: 35
Registered: ‎05-11-2011
My Device: 9800
My Carrier: bell

Re: screenshot an image, but it is blank

just wonder does it necessary to keep focus on a screen before one can use display.snapshot?

bog
Contributor
Posts: 35
Registered: ‎05-11-2011
My Device: 9800
My Carrier: bell

Re: screenshot an image, but it is blank

well, it is a false alarm, it seems that is some problems of bb simulator. It works fine on device.

Just in case, someone get in this trouble later, try it on device.