cvs: gd(GD_2_0) /libgd/src NEWS gd.c /libgd/src/tests/gdimagecopy CMakeLists.txt bug00081.c bug00081_exp.png

[email protected] ("Pierre-Alain Joye") Tue, 20 Nov 2007 13:42:11 -0000
Newsgroups php.gd.cvs
Message-ID <cvspajoye1195566131@cvsserver>
pajoye		Tue Nov 20 13:42:11 2007 UTC

  Added files:                 (Branch: GD_2_0)
    /gd/libgd/src/tests/gdimagecopy	bug00081.c bug00081_exp.png 

  Modified files:              
    /gd/libgd/src	gd.c NEWS 
    /gd/libgd/src/tests/gdimagecopy	CMakeLists.txt 
  Log:
  - #81, gdImageCopy ignores the transparent color
  
  
http://cvs.php.net/viewvc.cgi/gd/libgd/src/gd.c?r1=1.49.2.23&r2=1.49.2.24&diff_format=u
Index: gd/libgd/src/gd.c
diff -u gd/libgd/src/gd.c:1.49.2.23 gd/libgd/src/gd.c:1.49.2.24
--- gd/libgd/src/gd.c:1.49.2.23	Sun Sep  9 13:12:39 2007
+++ gd/libgd/src/gd.c	Tue Nov 20 13:42:11 2007
@@ -1,4 +1,4 @@
-/* $Id: gd.c,v 1.49.2.23 2007/09/09 13:12:39 mattias Exp $ */
+/* $Id: gd.c,v 1.49.2.24 2007/11/20 13:42:11 pajoye Exp $ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -2260,7 +2260,9 @@
 		  for (y = 0; (y < h); y++) {
 			  for (x = 0; (x < w); x++) {
 				  int c = gdImageGetTrueColorPixel (src, srcX + x, srcY + y);
-				  gdImageSetPixel (dst, dstX + x, dstY + y, c);
+				  if (c != src->transparent) {
+					  gdImageSetPixel (dst, dstX + x, dstY + y, c);
+				  }
 			  }
 		  }
 	  } else {
http://cvs.php.net/viewvc.cgi/gd/libgd/src/NEWS?r1=1.4.2.35&r2=1.4.2.36&diff_format=u
Index: gd/libgd/src/NEWS
diff -u gd/libgd/src/NEWS:1.4.2.35 gd/libgd/src/NEWS:1.4.2.36
--- gd/libgd/src/NEWS:1.4.2.35	Sun Nov 18 15:08:43 2007
+++ gd/libgd/src/NEWS	Tue Nov 20 13:42:11 2007
@@ -1,6 +1,8 @@
 'GD                                                                         NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 GD 2.0.36 (2007-11-xx)
+ 81, Fixed gdImageCopy with true color image, the transparent color was ignored
+     (Pierre, Mark Fisher)
  88, Fixed support of PNG grayscale image with alpha channel (Pierre)
  95, Added Netware builds script (Guenter)
  97, ease the creation of regexp to match symbols/functions in the sources 
http://cvs.php.net/viewvc.cgi/gd/libgd/src/tests/gdimagecopy/CMakeLists.txt?r1=1.1&r2=1.1.2.1&diff_format=u
Index: gd/libgd/src/tests/gdimagecopy/CMakeLists.txt
diff -u gd/libgd/src/tests/gdimagecopy/CMakeLists.txt:1.1 gd/libgd/src/tests/gdimagecopy/CMakeLists.txt:1.1.2.1
--- gd/libgd/src/tests/gdimagecopy/CMakeLists.txt:1.1	Tue Jan 23 23:57:53 2007
+++ gd/libgd/src/tests/gdimagecopy/CMakeLists.txt	Tue Nov 20 13:42:11 2007
@@ -1,3 +1,10 @@
-add_executable(bug00007 bug00007.c)
-target_link_libraries (bug00007 gdTest ${GD_LIB})
-ADD_TEST(bug00007 ${EXECUTABLE_OUTPUT_PATH}/bug00007)
+SET(TESTS_FILES
+	bug00007
+	bug00081
+)
+
+FOREACH(test_name ${TESTS_FILES})
+	add_executable(${test_name} "${test_name}.c")
+	target_link_libraries (${test_name} gdTest ${GD_LIB})
+	ADD_TEST(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
+ENDFOREACH(test_name)

http://cvs.php.net/viewvc.cgi/gd/libgd/src/tests/gdimagecopy/bug00081.c?view=markup&rev=1.1
Index: gd/libgd/src/tests/gdimagecopy/bug00081.c
+++ gd/libgd/src/tests/gdimagecopy/bug00081.c