TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

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

Open lvsan opened this issue 3 years ago • 2 comments

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 avatar Sep 26 '22 07:09 lvsan

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.

lvsan avatar Sep 26 '22 08:09 lvsan

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.

Mike-Benoit avatar Feb 29 '24 21:02 Mike-Benoit