100% Java library for JPEG lossless decoding

自作多情 提交于 2019-11-29 03:06:04

问题


I'm searching for a library in 100% Java which could decode JPEG images with jpeg-lossless compression.

I know that ImageIO and JAI already could decode this images, but they're needed a native code which do not exists for all OS.

I would consider open and close source solutions, as ImageIO plugin or stand-alone.


回答1:


Marco Schmidt wrote a handy "List of Java libraries to read and write pixel image files" a long time ago. It is gone from the web now, but it still possible to view it with the Wayback Machine (as seen in 2009). I don't know if there are any lossless JPEG decoders there, but it might be a good place to start a search.




回答2:


TwelveMonkeys ImageIO has had support for lossless JPEG for a while.

I think it started out with the same code base as the rii-mango/JPEGLosslessDecoder, but it's main difference/advantage is that it uses the standard ImageIO API.

Basically, this will work:

BufferedImage image = ImageIO.read(new File("my-lossless-jpeg.jpg"));

Disclosure: I'm the main developer/maintainer of the library.




回答3:


Please have a look at David Clunie great work, this is really the best way!
[Update 09/2017] D. Clunie has updated his codec
http://www.pixelmed.com/jpeg.html
http://www.dclunie.com/pixelmed/software/codec/

This is a stand-alone JPEG codec that implements selective block redaction for use during de-identification. It also supports decompression of lossless JPEG images.

Regards.




回答4:


You can try ImageMagick and his open source Java interface JMagick, I've see that it was stable and quick.




回答5:


Found Grossroots DiCoM that can do what you want. It has bindings for Java. The library is very powerful and it is written in C++. You will have to build it and import the built jar file. I read a jpeg-lossless DICOM file and converted it to BuffredImage using this example.




回答6:


Seems you might have an answer here: I can't get an ImageReaderByFormatName("jpeg-lossless")

Hope that helps -

Perry



来源:https://stackoverflow.com/questions/5702142/100-java-library-for-jpeg-lossless-decoding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!