my dog learned polymorphism*
The moose likes Java Micro Edition and the fly likes Converting image to byte array in j2me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Converting image to byte array in j2me" Watch "Converting image to byte array in j2me" New topic
Author

Converting image to byte array in j2me

Ullas Vadakke
Greenhorn

Joined: May 19, 2006
Posts: 1
Hi friends
I am doing a project which requires to convert my images in png format to byte array and then pass it to the server in java . Could any anyone help me???
Are there any classes which helps to do this??
Thanking all in advance
Ullas
satyam gupt
Greenhorn

Joined: Feb 13, 2004
Posts: 8
put image in resource folder and use input streamreader to get byte array
Punit Raizada
Ranch Hand

Joined: Mar 20, 2004
Posts: 156
If you have MIDP 2.0 devices then you could you Image objects getPixels() method to get the pixel data. The server would then add the header info etc.


SCJP 1.4
Everything that can go wrong will go wrong -Murphy
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Converting image to byte array in j2me
 
Similar Threads
byte array to inputstream
Arrays
servlet applet commnication
Convert audio file into bytes
byte array of byte arrays.