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

Native Development

Reply
Contributor
pbcoder
Posts: 17
Registered: ‎07-01-2011
My Device: Playbook
My Carrier: DontKnow

Save image/screenshot into "Pictures" app

Hi,

 

Is it possible to programmatically save an image in memory to a folder inside the "Pictures" app? Essentially, I'd like to take a screenshot of my app and save it in such a way that the user can see it by going to "Pictures"->"Camera Pictures" (or perhaps a folder other than "Camera Pictures"). I don't want to ask the user to press the volume keys (I also don't want everything the user sees going into the screenshot... for example, user interface buttons).

 

Thanks in advance :smileyhappy:

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Save image/screenshot into "Pictures" app

You cannot take screenshot of the screen because it is a security issue, you can take screenshot of your own

app by just capturing your own screen buffer and dumping it into image using image libraries. Unfortunately I don't know exact details on how it is done.

Please use plain text.
Contributor
pbcoder
Posts: 17
Registered: ‎07-01-2011
My Device: Playbook
My Carrier: DontKnow

Re: Save image/screenshot into "Pictures" app

Thanks for the info :smileyvery-happy:

 

So, let's say I can save a JPG image file programmatically. In which folder of the filesystem should I save it so it appears under "Pictures" -> "Camera Pictures" ?

 

Please use plain text.
Contributor
pbcoder
Posts: 17
Registered: ‎07-01-2011
My Device: Playbook
My Carrier: DontKnow

Re: Save image/screenshot into "Pictures" app

[ Edited ]

Ok,  I think I found the path... and hopefully this should work (I'll update once I've tested it):

 

1. Create an image in memory using some sort of image library (Blackberry Tablet SDK does not include any, correct?)

2. Save the image in memory to a file in the file system under "Shared\camera" (i.e. Shared\camera\my_image_001.jpg)

 

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Save image/screenshot into "Pictures" app

It shoudl have libpng, maybe other please search docs

Please use plain text.
Developer
superdirt
Posts: 541
Registered: ‎05-17-2009
My Device: Not Specified

Re: Save image/screenshot into "Pictures" app

1. Create an image in memory using some sort of image library (Blackberry Tablet SDK does not include any, correct?)

 

It looks like you can get the screenshot of your application's screen with screen_read_display() which is in the current API.

 

Scott

Please use plain text.