File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 19693
    
  20

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