Image compression software
I need an image compression program that work开发者_Python百科s in Linux that is capable of compressing all the major image formats. I need it for my tomcat webserver so if it was a Java implementation, that would be great (I know, not likely). I have looked around and only came across GraphicsMagick/ImageMagick (which are excellent) but are written in C and I only need an application that does compression so they are a bit feature rich for my needs.
Thanks for your help.
They're separate programs, but I recommend:
pngcrush and jpegtran
The Java JRE has support for encoding / decoding images to and from most common formats and no external programs should be necessary.
See Tiff compression using Java ImageIO for an example.
In the end I decided to use im4java with GraphicsMagick. im4java is a Java wrapper around the command line for executing image/graphicsMagick commands. GraphicsMagick is capable of reducing the file size of all the major image formats. This combination has worked quite well so far.
精彩评论