From 9ce48756af05a7eddf8138ea8f430b0550ec390c Mon Sep 17 00:00:00 2001 From: mhpcc <50452722+mhpcc@users.noreply.github.com> Date: Tue, 28 Dec 2021 12:54:49 +0100 Subject: [PATCH] explicitly cast values to int for imagesetpixel (#460) Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com> --- tcpdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcpdf.php b/tcpdf.php index 2696c52..e41bce9 100644 --- a/tcpdf.php +++ b/tcpdf.php @@ -7359,7 +7359,7 @@ class TCPDF { $color = imagecolorat($img, $xpx, $ypx); // get and correct gamma color $alpha = $this->getGDgamma($img, $color); - imagesetpixel($imgalpha, $xpx, $ypx, $alpha); + imagesetpixel($imgalpha, (int) $xpx, (int) $ypx, (int) $alpha); } } imagepng($imgalpha, $tempfile_alpha);