1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 12:42:29 +02:00

Fixed bug #22544 (missing fix from official gd).

This commit is contained in:
Ilia Alshanetsky
2003-03-05 15:57:28 +00:00
parent 64bb5135d9
commit fd088722a7

View File

@@ -561,9 +561,10 @@ gdImagePngCtx (gdImagePtr im, gdIOCtx * outfile)
}
if (im->trueColor && (!im->saveAlphaFlag) && (transparent >= 0))
{
trans_rgb_value.red = gdTrueColorGetRed (im->trueColor);
trans_rgb_value.green = gdTrueColorGetGreen (im->trueColor);
trans_rgb_value.blue = gdTrueColorGetBlue (im->trueColor);
/* 2.0.9: fixed by Thomas Winzig */
trans_rgb_value.red = gdTrueColorGetRed (im->transparent);
trans_rgb_value.green = gdTrueColorGetGreen (im->transparent);
trans_rgb_value.blue = gdTrueColorGetBlue (im->transparent);
png_set_tRNS (png_ptr, info_ptr, 0, 0, &trans_rgb_value);
}
if (!im->trueColor)