convert a tiff image to another format (using JAI ?)

C

cyril

Hi,

I wonder how can I convert a TIFF image into a jpeg or GIF image. JAI
seems to offer a lot of functionnalities for the imaging process but I
can't find a way todo this simply.

Does anyone got a code snippet to do this ?

Thanks

Regards.
 
C

cyril

Actually I found a way on a forum on the jdn :

FileSeekableStream stream = new FileSeekableStream(TIFFImageAsfile);
RenderedOp op = JAI.create("stream", stream);
ParameterBlock pb = new ParameterBlock();
pb.addSource(op);
pb.add(jpgFilePath);
pb.add("jpeg");
JAI.create("filestore", pb);
stream.close();

Hope this could help others
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top