contao/image

Save progressive JPEGs

ausi opened this issue · 3 comments

ausi commented

We should use Imagine\Image\ImageInterface::interlace() to store the JPEG files as progressive images.

This should most likely be configurable.

ausi commented

From https://www.imagemagick.org/script/command-line-options.php#interlace:

Use Line or Plane to create an interlaced PNG or GIF or progressive JPEG image.

And http://stackoverflow.com/questions/7261855/recommendation-for-compressing-jpg-files-with-imagemagick:

convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% source.jpg result.jpg

Looks like ImageInterface::INTERLACE_PLANE is the way to go.

Any setting but INTERLACE_NONE should get us a progressive JPG:

http://stackoverflow.com/questions/36424677/whats-the-practical-differences-between-imagickinterlace-jpeg-interlace-plane

But I also think that INTERLACE_PLANE is the way to go.

ausi commented

Implemented in c70dbc4.

Progressive JPEGs can now be generated by using the Imagine option 'interlace' => \Imagine\Image\ImageInterface::INTERLACE_PLANE.