image_optim icon indicating copy to clipboard operation
image_optim copied to clipboard

Add in support for mozjpeg

Open mikeytown2 opened this issue 10 years ago • 5 comments

https://github.com/mozilla/mozjpeg

mikeytown2 avatar Feb 18 '15 21:02 mikeytown2

I've already tried mozjpeg and libjpeg-turbo, and did not get better results than from jpeglibs jpegtran with jpegrescan. Please tell me if I you've got better results or if I'm missing some other tool from mozjpeg.

toy avatar Feb 19 '15 01:02 toy

@mikeytown2 Do you have any input on this issue?

toy avatar May 02 '15 16:05 toy

cjpeg (part of mozjpeg) seems interesting if doing lossy compression. V3 Seems to be an improvement in comparison to turbo: https://www.progville.com/frontend/optimizing-jpeg-images-mozjpeg/

mikeytown2 avatar May 05 '15 20:05 mikeytown2

Hi, I have also been searching for a gem to do MozJPEG compression, but didn't find anything besides this issue, so I created these gems:

JPEG and PNG compression using MozJPEG (with V3 binaries) : https://github.com/svoboda-jan/mozjpeg-ruby

Paperclip compression processor using MozJPEG (using the above mozjpeg gem) : https://github.com/svoboda-jan/paperclip-mozjpeg

svoboda-jan avatar May 11 '15 18:05 svoboda-jan

@mikeytown2 @svoboda-jan image_optim has support for jpeg-recompress which relies on mozjpeg, so uses its better compression (and image_optim_pack has the binary). And the benefit of jpeg-recompress is that it allows to specify perceived loss of quality instead of more abstract jpeg quality. But I will try pure mozjpeg once more when I have some time.

toy avatar May 12 '15 21:05 toy