From: Ilia Alshanetsky Date: Thu, 12 Jun 2003 19:31:44 +0000 (+0000) Subject: Fixed bug #24155 (gdImageRotate270 incorrectly use x parameter for y axis) X-Git-Tag: RELEASE_1_0_2~300 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=490da4fbb758190b296888f8372f5ba8b6034f2f;p=php Fixed bug #24155 (gdImageRotate270 incorrectly use x parameter for y axis) --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 7b0411a2b1..010662564f 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -2613,7 +2613,7 @@ gdImagePtr gdImageRotate270 ( gdImagePtr src ) if (dst != NULL) { gdImagePaletteCopy (dst, src); - for (uY = 0; uYsx; uY++) { + for (uY = 0; uYsy; uY++) { for (uX = 0; uXsx; uX++) { c = f (src, uX, uY); gdImageSetPixel(dst, (dst->sx - uY - 1), uX, c); diff --git a/ext/gd/tests/bug24155.phpt b/ext/gd/tests/bug24155.phpt new file mode 100644 index 0000000000..aa931e619f --- /dev/null +++ b/ext/gd/tests/bug24155.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #24155 (gdImageRotate270 rotation problem). +--SKIPIF-- + +--FILE-- + +--EXPECT-- +cc867fd65c30883463ce58d0341f0997