Win a copy of Securing DevOps this week in the Security 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.
 
You can't expect to wield supreme executive power just because
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!