From: Pierre Joye Date: Wed, 4 Dec 2002 02:48:23 +0000 (+0000) Subject: Fix imagegd stdoutput X-Git-Tag: RELEASE_1_0b3~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00881ea504b75550a817aba77586b75bad58be92;p=php Fix imagegd stdoutput Typo 256 colors --- 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;