avalanche123/Imagine — pull request #184 by vchrm (2012-12-31 00:01:24+00:00)
Title: Image interlacing option in GD is supported

Today I read this article: http://calendar.perfplanet.com/2012/progressive-jpegs-a-new-best-practice/ and I realized Imagine is unable to create progressive JPEG images.

To create progressive JPEGs (and not only JPEGs, other formats support this too), interlacing bit has to be set. In PHP this is done via imageinterlace() function (see http://php.net/manual/en/function.imageinterlace.php#).

I've added option 'interlace' when saving GD images to Imagine\Gd\Image::saveOrOutput() method. The interlace bit is set (or not) according to $options['interlace'] right before calling the saving image*() GD function.