The Motorola Development Community


Go Back   MotorolaFans.com Forums > Developments > Development
Notices

Development Hacking, development, scripts etc

Reply

MotoFans NWBE

Join Date: Mar 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Location: Monterrey,Mexico

Quote  
#1
03-27-2008
Default help with Images

Hello everyone! I wrote a simple midlet for my A1200 to draw on a canvas. I use the Image class to draw on it. Now I would like to save that Image into a jpg file. I have managed to get a byte array to save to a file, but I still cant see what I draw. Any ideas on how to get the bytes from an image?
Reply With Quote


User Information
Current Phone: Motorola A1200i
Location: Monterrey,Mexico

ocmolina is offlineReport Post
MotoFans NWBE

Join Date: Oct 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Quote  
#2
03-27-2008
Default

I didn't know whether you code on kjava paltform
this is some java code :
==========================
Image image = createImage("your file name");
int width = image.getWidth();
int height = image.getHeight();
int []pixels32 = new int[width * bitmap];
image.getRGB(pixels32, 0, width, 0, 0, width, height);
=============================
BTW:if you still can't get a byte array from image, you may try to png
Reply With Quote


User Information
Lee.James is offlineReport Post
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:34 PM. Search Engine Friendly URLs by vBSEO 3.2.0 Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. VBulletin Skin by ForumMonkeys.