Welcome Guest, Not a member yet? Register   Sign In
ErrorException imagecreatefrompng()
(This post was last modified: 01-17-2022, 10:21 AM by hosterfy.)


I publish this issue, because there is an error when we try to import into a form a PNG image. The issue occurs only for PNG images, not for JPG.

imagecreatefrompng(): gd-png: libpng warning: Interlace handling should be turned on when using png_read_image

You can see it on this screenshot : https://prnt.sc/26et5v1

The impacted PHP version is 7.4.27 (all required extensions installed like GD, ImageMagick, etc. But when i change to PHP version 7.3.33 all is working.

I really don't understand why there is this issue only on 7.4 and above PHP version..

Also, i checked the above code, the image is properly uploaded but the CI code part is impacted by this issue :

PHP Code:
foreach($data['files'] as $file){
$edit_image = \Config\Services::image()
$avatar $file["name"]; 

Sorry about my bad english.

Thanks in advance.

I don't know this article is correct or not, but for your information:
PNG – deactivate interlace to avoid ‘libpng warning: Interlace handling should be turned on when using png_read_image’ – mixable Blog

Thanks for your reply, and yes i already see that, but the issue is CI side / configuration, because this function is a lib into CI.

Got the same problem. Is it any way to fix this?

Theme © iAndrew 2016 - Forum software by © MyBB