diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-03-05 15:57:28 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-03-05 15:57:28 +0000 |
commit | fd088722a73ccbd15f83254d6aea962ecffc2bfb (patch) | |
tree | 22883cf9dc12bd9ea6ac7a3309f57f31c4af3ae1 /ext/gd/libgd | |
parent | 64bb5135d96769b10ce3ac2f4231d5864effe03d (diff) | |
download | php-git-fd088722a73ccbd15f83254d6aea962ecffc2bfb.tar.gz |
Fixed bug #22544 (missing fix from official gd).
Diffstat (limited to 'ext/gd/libgd')
-rw-r--r-- | ext/gd/libgd/gd_png.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/gd/libgd/gd_png.c b/ext/gd/libgd/gd_png.c index 8d5effb5a2..a5850c6511 100644 --- a/ext/gd/libgd/gd_png.c +++ b/ext/gd/libgd/gd_png.c @@ -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) |