This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes creating an image from a hex string Java 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "creating an image from a hex string Java 6" Watch "creating an image from a hex string Java 6" New topic
Author

creating an image from a hex string Java 6

johnti davies
Greenhorn

Joined: Jun 09, 2009
Posts: 1
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

Joined: Oct 27, 2005
Posts: 19543
    
  16

Your first step should be converting the HEX string into bytes (to be exact: a byte[]).


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating an image from a hex string Java 6
 
Similar Threads
Encryption
Grabbing Image Pixels through Pixel grabber & saving it to Database
Boardgame to interactive GUI -- need help
Save and retrieve image in derby database
want algorithm to generate 100+ distinct colors