I am looking at java APIs to convert JPEG file streams to TIFF files. I looked at the JAI but did not find something similar to what i am looking at.
Can someone point me to a good API which does this ?
I am looking at java APIs to convert JPEG file streams to TIFF files. I looked at the JAI but did not find something similar to what i am looking at.
Can someone point me to a good API which does this ?
The javax.imageio package has built-in writers for most of the popular image types, including jpg and tiff. Here's Sun's page on imageio.
http://java.sun.com/javase/6/docs/technotes/guides/imageio/index.html
There's an example here
http://log.robmeek.com/2005/08/write-tiff-in-java.html
and another here
http://stackoverflow.com/questions/281512/tiff-compression-using-java-imageio
JIMI is quite easy to use. http://java.sun.com/products/jimi/
Unfortunately Sun transmogriffed it into Java2D (afair) and THAT is not quite that easy to use.
For a quick solution, use JIMI.
JAI (Java Advanced Imaging) is the best solution. It has a decoder and encoder for TIFF files.
JAVA JAI does support encoding/decoding TIFF. You need to get the image codecs (<--link) and call them like ImageDecoder decoder = ImageCodec.createImageDecoder("tiff", seekableStream, null);