From: Pierre Joye Date: Sat, 4 Nov 2006 02:23:45 +0000 (+0000) Subject: - MFB: #39273, imagecopyresized and alpha channel X-Git-Tag: RELEASE_1_0_0RC1~1138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=799e6c0e9876d49596fccdc6e00c6dba38ba69b6;p=php - MFB: #39273, imagecopyresized and alpha channel --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 14dcc110c7..ff2b0596f5 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -754,7 +754,7 @@ int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y) int p = gdImageGetPixel(im, x, y); if (!im->trueColor) { - return gdTrueColorAlpha(im->red[p], im->green[p], im->blue[p], (im->transparent == p) ? gdAlphaTransparent : gdAlphaOpaque); + return gdTrueColorAlpha(im->red[p], im->green[p], im->blue[p], (im->transparent == p) ? gdAlphaTransparent : im->alpha[p]); } else { return p; } diff --git a/ext/gd/tests/bug39273.phpt b/ext/gd/tests/bug39273.phpt new file mode 100644 index 0000000000..4384500447 --- /dev/null +++ b/ext/gd/tests/bug39273.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #37360 (gdimagecreatefromgif, bad image sizes) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +32FF0000