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

Some Images showed "libpng warning: Interlace handling should be turned on when using png_read_image" #893

Open
cuimingda opened this issue Sep 15, 2018 · 3 comments

Comments

@cuimingda
Copy link

I use the same code to test Image:make, some image is OK, some will display warning:

libpng warning: Interlace handling should be turned on when using png_read_image

I test for some cases:

$warningImageUrl = "https://www.bulgari.cn/media/catalog/product/cache/815b9fb227016af97d5136ae474ea5a3/3/5/355148_001_1.png";
$fineImageUrl = "https://www.vancleefarpels.cn/content/dam/rcq/vca/16/27/32/3/1627323.png";

Image::make($warningImageUrl); // output warning

Image::make($fineImageUrl); // output nothing

$image = Image::make($warningImageUrl); // output warning
$image->interlace(false);
$image->save(storage_path("test.png"));

Image::make(storage_path("test.png")); // output nothing

what is the differences between the two png images? and although there is warning, but images saved succeed.

My question is how to disable this warning?

@skylei
Copy link

skylei commented Dec 24, 2018

@cbaconnier
Copy link

I had the same warning when running my tests using libpng 1.6.34

I fixed it using GIMP by re-exporting the image to PNG and I had to uncheck Interlacing (Adam7)

More about how (not) interlacing will affect on your image on this stackexange answer

@robertoaguilar-ftf
Copy link

Contributing to @cbaconnier's solution, If you don't have access to GIMP, you can use ImageMagick.

Once installed, interlaced can be removed by running:

magick convert -interlace none path/to/source-image.png path/to/target-image.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants