将 JPEG 转换为 TIFF 的 Java API
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/967557/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java API to convert JPEG to TIFF
提问by EclipseGuru
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.
我正在研究将 JPEG 文件流转换为 TIFF 文件的 Java API。我查看了 JAI,但没有找到与我正在查看的内容类似的内容。
Can someone point me to a good API which does this ?
有人可以给我指出一个很好的 API 吗?
采纳答案by objects
There's an example here
这里有一个例子
http://log.robmeek.com/2005/08/write-tiff-in-java.html
http://log.robmeek.com/2005/08/write-tiff-in-java.html
and another here
另一个在这里
回答by Hardwareguy
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.
javax.imageio 包具有针对大多数流行图像类型(包括 jpg 和 tiff)的内置编写器。这是 Sun 在 imageio 上的页面。
http://java.sun.com/javase/6/docs/technotes/guides/imageio/index.html
http://java.sun.com/javase/6/docs/technotes/guides/imageio/index.html
回答by Thorbj?rn Ravn Andersen
JIMI is quite easy to use. http://java.sun.com/products/jimi/
JIMI 非常易于使用。 http://java.sun.com/products/jimi/
Unfortunately Sun transmogriffed it into Java2D (afair) and THAT is not quite that easy to use.
不幸的是,Sun 将其转换为 Java2D(公平),这并不是那么容易使用。
For a quick solution, use JIMI.
如需快速解决方案,请使用 JIMI。
回答by BoDiE2003
JAI (Java Advanced Imaging) is the best solution. It has a decoder and encoder for TIFF files.
JAI(Java Advanced Imaging)是最好的解决方案。它有一个用于 TIFF 文件的解码器和编码器。
回答by Jake
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);
JAVA JAI 确实支持编码/解码 TIFF。您需要获取图像编解码器(<--link)并将它们称为ImageDecoder decoder = ImageCodec.createImageDecoder("tiff", seekableStream, null);