tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.22k stars 1.52k forks source link

GD library error: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile #553

Open lvsan opened 2 years ago

lvsan commented 2 years ago

HI,

I have facing an issues when upload the image to be display for pdf using path. after I have amend the tcpdf.php and change as below :

$img = imagecreatefrompng($file); ===> $img = @imagecreatefrompng($file);

then the files is working fine. But currently i try using imageExpression to pass the value to the path, but the image not working.

Anyone can assists?

Thanks.

lvsan commented 2 years ago

HI,

I have able to solve when i have amend the tcpdf.php under the public function Image(.... function.

image

The above image is the code that I have amend to allow display the png image.

Below is the image successfully display.

image

thanks.

Mike-Benoit commented 8 months ago

We are seeing this warning quite frequently as well. Since it is just a warning and not an error, it would be nice to silence it.