This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating an image from a hex string Java 6

 
johnti davies
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I would like to know how to create an image from a passed hex string. I have a legacy swf that puts out something like this

FFFFFFF,FFFFFF,FFFFFF,.............etc

My web app grabs this info along with the fileType(ie JPG GIF) and width and height data ready to be processed by Java.

I have looked at java.awt.image.MemoryImageSource but am not to sure how to apply it or even if its the class for the job. If someone who has done something like this before could point me in the right direction I would be very grateful.

Regards

Johnti
 
Rob Spoor
Sheriff
Pie
Posts: 20552
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your first step should be converting the HEX string into bytes (to be exact: a byte[]).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic