cvs: gd /libgd gd.c

[email protected] ("Pierre-Alain Joye")
Newsgroups php.gd.cvs
Message-ID <cvspajoye1167856733@cvsserver>
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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.