Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progressive JPG Rendering #177

Open
marcus-at-localhost opened this issue Mar 31, 2019 · 3 comments
Open

Progressive JPG Rendering #177

marcus-at-localhost opened this issue Mar 31, 2019 · 3 comments
Assignees
Labels
feature to-be-documented This feature needs to be documented on cimage.se

Comments

@marcus-at-localhost
Copy link

would it be possible to render JPGs progressively?

https://stackoverflow.com/questions/41732652/convert-jpeg-to-a-progressive-jpeg-in-php

@mosbth
Copy link
Owner

mosbth commented Apr 2, 2019

I havent tried it, but should be possible by adding a row

imageinterlace($this->image, true);

above https://github.com/mosbth/cimage/blob/master/CImage.php#L2442

Thats a way to trie it out.

To actually implement it one should add some setting to the config file for default behavior and make it possible to override through the querystring like &interlace=true and &interlace=false.

@mosbth mosbth self-assigned this Apr 2, 2019
@mosbth mosbth added the feature label Apr 2, 2019
@yogeshsaroya
Copy link

I havent tried it, but should be possible by adding a row

imageinterlace($this->image, true);

above https://github.com/mosbth/cimage/blob/master/CImage.php#L2442

Thats a way to trie it out.

To actually implement it one should add some setting to the config file for default behavior and make it possible to override through the querystring like &interlace=true and &interlace=false.

Good. it's working.

@mosbth mosbth added the to-be-documented This feature needs to be documented on cimage.se label Jun 8, 2020
@mosbth
Copy link
Owner

mosbth commented Jun 8, 2020

Implemented in v0.8.0.

  1. Configuration file option to set default behaviour for all jpeg files:
    /**
     * Default options using interlaced progressive JPEG images. Set to true to
     * always render jpeg images as interlaced. This setting can be overridden
     * by using `?interlace=true` or `?interlace=false`.
     *
     * Default values are:
     *  interlace:  false
     */
     /*'interlace' => false,*/
  1. Use option &interlace in query string to render image as interlaced, will override configuration file setting.

  2. Override settings from configuration file using query string with value, as &interlace=true or &interlace=false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature to-be-documented This feature needs to be documented on cimage.se
Projects
None yet
Development

No branches or pull requests

3 participants