Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Converting image to byte array in j2me  RSS feed

 
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
 
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
 
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
Boost this thread!