From: Takeshi Abe Date: Wed, 11 Feb 2009 16:30:48 +0000 (+0000) Subject: optimization via the row-major order. X-Git-Tag: php-5.4.0alpha1~191^2~4295 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9874bacbc9162a4954104447ff558c9f7a5e7692;p=php optimization via the row-major order. --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 091e10b841..7f5620cc61 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -613,8 +613,8 @@ void gdImagePaletteCopy (gdImagePtr to, gdImagePtr from) xlate[i] = -1; } - for (x = 0; x < to->sx; x++) { - for (y = 0; y < to->sy; y++) { + for (y = 0; y < to->sy; y++) { + for (x = 0; x < to->sx; x++) { p = gdImageGetPixel(to, x, y); if (xlate[p] == -1) { /* This ought to use HWB, but we don't have an alpha-aware version of that yet. */