From fcf621607d64199c6901a28967382bba99a4a868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 26 Aug 2021 18:54:59 +0200 Subject: [PATCH] Fix gdAlphaMax limit typo --- ext/gd/libgd/gd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 63eb02d6af37f..2664288162a7a 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -2625,7 +2625,7 @@ void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, i red = red >= 255.5 ? 255 : red+0.5; blue = blue >= 255.5 ? 255 : blue+0.5; green = green >= 255.5 ? 255 : green+0.5; - alpha = alpha >= gdAlphaMax+0.5 ? 255 : alpha+0.5; + alpha = alpha >= gdAlphaMax+0.5 ? gdAlphaMax : alpha+0.5; gdImageSetPixel(dst, x, y, gdTrueColorAlpha ((int)red, (int)green, (int)blue, (int)alpha)); } }