This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting image to byte array in j2me

 
Ullas Vadakke
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put image in resource folder and use input streamreader to get byte array
 
Punit Raizada
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic