BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-21-2009, 07:19 AM   #1
misty83
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Default how to save bitmap to *.bmp file?

Please Login to Remove!

hi,
how can i save bitmap to *.bmp file? i'm making a screenshot, store it to the bitmap:
Code:
Bitmap _bitmap= new Bitmap(Display.getWidth(), Display.getHeight());
		Display.screenshot(_bitmap);

and i want to write it to the *.bmp file. how can i do this?
Offline  
Old 04-21-2009, 08:34 AM   #2
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default

You questions have me curious as to what you're working on. I will try to contain myself.

Unfortunately from what I've come across the API seems limited to reading images and displaying them, not saving to files. I don't think the BMP format is very complex though so you may be able to write your own routine.

I did find net.rim.device.api.system.EncodedImage.getData(), there is a subclass net.rim.device.api.system.BMPEncodedImage,
which "Returns the encoded data of this image." But how close that is to the file format I do not know.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 04-22-2009, 12:54 AM   #3
misty83
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Default

i need to store bitmap to bmp just to compare smth (too long to explain). getData() method may be used only for PNG and JPEG. BMPEncodedImage was aslo checked by me, and to use it i must first make a jpg(or png) from my bitmap and then store it to BMPEncodedImage.. but unfortunatelly it is not a BMPImage!! it is still a jpg(or png, depend on what we used). so i do not know if it is a bug in rim's api or i do not know what.
anyway i just must dump a bitmap to *.bmp image..
Offline  
Old 04-22-2009, 07:48 AM   #4
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default

Sorry, no more ideas here.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 04-22-2009, 09:26 AM   #5
hippocamp software
Thumbs Must Hurt
 
Join Date: Feb 2009
Model: 9000
PIN: N/A
Carrier: T-Mobile
Posts: 67
Default

use the FileConnection api
Offline  
Old 04-29-2009, 01:29 AM   #6
misty83
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Default

yhh... i did. but the problem is that You can store an image only to png or jpg. and i'm looking for an idea of how to store it as a bitmap!
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Johnson Controls York Solution XTI-033X045-NAFA146A Air Make Up Handling Unit picture

Johnson Controls York Solution XTI-033X045-NAFA146A Air Make Up Handling Unit

$4500.00



New In Box JOHNSON CONTROLS F61KB-11C Water Flow Switch picture

New In Box JOHNSON CONTROLS F61KB-11C Water Flow Switch

$49.50



Johnson Controls Metasys MS-VMA1610-1 VAV Controller picture

Johnson Controls Metasys MS-VMA1610-1 VAV Controller

$50.00



Johnson Controls Metasys (AP-VMA1420-0) VAV Modular Controller picture

Johnson Controls Metasys (AP-VMA1420-0) VAV Modular Controller

$26.24



Johnson controls Map-1810 picture

Johnson controls Map-1810

$525.00



Johnson Controls MAP1850 Gateway TL-MAP1850-0C picture

Johnson Controls MAP1850 Gateway TL-MAP1850-0C

$399.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.