moriyoshi Sat Nov 23 00:20:43 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/gd gd.c
Log:
MFH (imagecolordeallocate() fix)
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.221 php4/ext/gd/gd.c:1.221.2.1
--- php4/ext/gd/gd.c:1.221 Tue Nov 12 06:49:11 2002
+++ php4/ext/gd/gd.c Sat Nov 23 00:20:43 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.221 2002/11/12 11:49:11 helly Exp $ */
+/* $Id: gd.c,v 1.221.2.1 2002/11/23 05:20:43 moriyoshi Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1814,6 +1814,12 @@
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
+ #if HAVE_LIBGD20
+ /* We can return right away for a truecolor image as deallocating colours is
+meaningless here */
+ if (gdImageTrueColor(im)) {
+ RETURN_TRUE;
+ }
+ #endif
convert_to_long_ex(index);
col = Z_LVAL_PP(index);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php