cvs: gd /libgd gd.c
| From: | Pierre-Alain Joye | Date: | Wed, 03 Jan 2007 20:38:53 +0000 |
| Subject: | cvs: gd /libgd gd.c | ||
| Groups: | php.gd.cvs | ||
| Request: | Send a blank email to php-gd-cvs+get-51@lists.php.net to get a copy of this message | ||
pajoye Wed Jan 3 20:38:53 2007 UTC
Modified files:
/gd/libgd gd.c
Log:
#22, missing immplementation
http://cvs.php.net/viewvc.cgi/gd/libgd/gd.c?r1=1.42&r2=1.43&diff_format=u
Index: gd/libgd/gd.c
diff -u gd/libgd/gd.c:1.42 gd/libgd/gd.c:1.43
--- gd/libgd/gd.c:1.42 Wed Jan 3 20:34:50 2007
+++ gd/libgd/gd.c Wed Jan 3 20:38:53 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.42 2007/01/03 20:34:50 pajoye Exp $ */
+/* $Id: gd.c,v 1.43 2007/01/03 20:38:53 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -2451,9 +2451,14 @@
if ((sx >= srcX) && (sx < srcX + srcWidth) &&
(sy >= srcY) && (sy < srcY + srcHeight))
{
- int c = gdImageGetPixel (src, sx, sy);
- if (!src->trueColor)
- {
+ int c = gdImageGetPixel (src, sx, sy);
+ /* 2.0.34: transparency wins */
+ if (c == src->transparent)
+ {
+ gdImageSetPixel (dst, dx, dy, dst->transparent);
+ }
+ else if (!src->trueColor)
+ {
/* Use a table to avoid an expensive
lookup on every single pixel */
if (cmap[c] == -1)