diff options
-rw-r--r-- | ext/gd/gd.c | 8 | ||||
-rw-r--r-- | ext/gd/gd_ctx.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 05cee2c80c..5c47e43a8a 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -855,8 +855,8 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char (*func_p)(im, fp, q); break; case PHP_GDIMG_TYPE_WBM: - for(i=0; i < im->colorsTotal; i++) { - if(im->red[i] == 0) break; + for(i=0; i < gdImageColorsTotal(im); i++) { + if(gdImageRed(im, i) == 0) break; } (*func_p)(im, i, fp); break; @@ -886,8 +886,8 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char (*func_p)(im, tmp, q); break; case PHP_GDIMG_TYPE_WBM: - for(i=0; i < im->colorsTotal; i++) { - if(im->red[i] == 0) break; + for(i=0; i < gdImageColorsTotal(im); i++) { + if(gdImageRed(im, i) == 0) break; } (*func_p)(im, q, tmp); break; diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index b3e51b7653..3e8d595c22 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -82,8 +82,8 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, (*func_p)(im, ctx, q); break; case PHP_GDIMG_TYPE_WBM: - for(i=0; i < im->colorsTotal; i++) { - if(im->red[i] == 0) break; + for(i=0; i < gdImageColorsTotal(im); i++) { + if(gdImageRed(im, i) == 0) break; } (*func_p)(im, i, ctx); break; |