diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gd.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -919,7 +919,9 @@ BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color) if (color >= gdMaxColors) { return; } - im->alpha[im->transparent] = gdAlphaOpaque; + if (im->transparent != -1) { + im->alpha[im->transparent] = gdAlphaOpaque; + } im->alpha[color] = gdAlphaTransparent; im->transparent = color; } |