Don't forget a test for this bug..
--Jani
On Sat, 23 Jul 2005, Pierre-Alain Joye wrote:
pajoye Sat Jul 23 12:41:42 2005 EDT
Modified files:
/php-src/ext/gd/libgd gd.c
Log:
- fix #33794 imagerotate rotates only CCW
introduced by transparent color patch
http://cvs.php.net/diff.php/php-src/ext/gd/libgd/gd.c?r1=1.89&r2=1.90&ty=u
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.89 php-src/ext/gd/libgd/gd.c:1.90
--- php-src/ext/gd/libgd/gd.c:1.89 Sun May 1 02:01:56 2005
+++ php-src/ext/gd/libgd/gd.c Sat Jul 23 12:41:38 2005
@@ -2797,10 +2797,11 @@
a = gdImageAlpha(src,c);
c = gdTrueColorAlpha(r, g, b, a);
}
+
if (ignoretransparent && c == dst->transparent)
{
- gdImageSetPixel(dst, uY, (dst->sy - uX -
1), dst->transparent);
+ gdImageSetPixel(dst, (dst->sx - uX - 1),
(dst->sy - uY - 1), dst->transparent);
} else {
- gdImageSetPixel(dst, uY, (dst->sy - uX
- 1), c);
+ gdImageSetPixel(dst, (dst->sx - uX - 1),
(dst->sy - uY - 1), c);
}
}
}
@@ -2839,10 +2840,11 @@
a = gdImageAlpha(src,c);
c = gdTrueColorAlpha(r, g, b, a);
}
+
if (ignoretransparent && c == dst->transparent)
{
- gdImageSetPixel(dst, uY, (dst->sy - uX -
1), dst->transparent);
+ gdImageSetPixel(dst, (dst->sx - uY - 1),
uX, dst->transparent);
} else {
- gdImageSetPixel(dst, uY, (dst->sy - uX
- 1), c);
+ gdImageSetPixel(dst, (dst->sx - uY -
1), uX, c);
}
}
}
--
Donate @ http://pecl.php.net/wishlist.php/sniper
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php