-1 resets the transparent color, return here.

master
Pierre Joye 2021-08-25 21:48:19 +07:00
parent f705975eca
commit 3a4d2127ef
1 changed files with 3 additions and 0 deletions

View File

@ -898,10 +898,13 @@ BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color)
// Reset ::transparent
if (color == -1) {
im->transparent = -1;
return;
}
if (color < -1) {
return;
}
if (im->trueColor) {
im->transparent = color;
return;