Hi,
This tiny patch prevents the warnings when applying imagecolordeallocate()
on true colour values. I suppose this new behaviour would be more
consistent because we can use imagecolorallocate() with true colour images.
Then what do you guys think about this issue?
Moriyoshi
Index: ext/gd/gd.c
===================================================================
RCS file: /repository/php4/ext/gd/gd.c,v
retrieving revision 1.223
diff -u -r1.223 gd.c
--- ext/gd/gd.c 14 Nov 2002 15:09:53 -0000 1.223
+++ ext/gd/gd.c 22 Nov 2002 20:59:19 -0000
@@ -1874,6 +1874,11 @@
gdImageColorDeallocate(im, col);
RETURN_TRUE;
} else {
+#if HAVE_LIBGD20
+ if (gdImageTrueColor(im)) {
+ RETURN_TRUE;
+ }
+#endif
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Color index %d out of
range", col);
RETURN_FALSE;
}
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php