JPEG compression library for PHP

A

Anonymous

Guest
So for .pngs, I used a library called pngquant (also used by TinyPNG, Compressor, Kraken, etc.). I was wondering if there is a good JPEG compression library out there, similar to TinyJPEG.com or JPEGMini.com, since they are able to compress JPEGS without a noticeable difference somehow. I get the feeling that they are using a free library, like pngquant, but I can't seem to find any libraries for php that does a good job of compressing.

Obviously I could use the built in imagejpeg function in GD and imagemagick, but somehow when I set the compression to 75 or 85, the images frequently become very blurry and even larger in size than images that are compressed using TinyJPEG or JPEGMini. I'd like to be able to use a good library, so I can create an automated script to compress my JPEGs, like I do with my PNGs.
 
Have you tried http://php.net/IMagick? Not something I've tried, but may be worth a try.
 
Hi, yes I did try it. It looks better than GD, but compresses it less. Thanks anyway.
 
Back
Top