diff options
| -rw-r--r-- | ext/gd/gd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 00b7746432..7b546420d9 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1591,7 +1591,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char break; case PHP_GDIMG_TYPE_GD: if(im->trueColor){ - gdImageTrueColorToPalette(im,1,255); + gdImageTrueColorToPalette(im,1,256); } (*func_p)(im, fp); break; @@ -1626,6 +1626,12 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char } (*func_p)(im, q, tmp); break; + case PHP_GDIMG_TYPE_GD: + if(im->trueColor){ + gdImageTrueColorToPalette(im,1,256); + } + (*func_p)(im, tmp); + break; default: (*func_p)(im, tmp); break; |
