cvs: php4(PHP_4_0_7) /ext/gd gd.c
| From: | Rasmus Lerdorf | Date: | Thu, 27 Sep 2001 07:39:25 +0000 |
| Subject: | cvs: php4(PHP_4_0_7) /ext/gd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7591@lists.php.net to get a copy of this message | ||
rasmus Thu Sep 27 03:39:25 2001 EDT
Modified files: (Branch: PHP_4_0_7)
/php4/ext/gd gd.c
Log:
MFH
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.154.2.3 php4/ext/gd/gd.c:1.154.2.4
--- php4/ext/gd/gd.c:1.154.2.3 Thu Sep 6 20:28:26 2001
+++ php4/ext/gd/gd.c Thu Sep 27 03:39:24 2001
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.154.2.3 2001/09/07 00:28:26 sniper Exp $ */
+/* $Id: gd.c,v 1.154.2.4 2001/09/27 07:39:24 rasmus Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1577,10 +1577,16 @@
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
+#if HAVE_LIBGD20
+ if(im->truecolor) {
+ php_error(E_WARNING, "ImageColorAt does not work on TrueColor images");
+ RETURN_FALSE;
+ }
+#endif
convert_to_long_ex(x);
convert_to_long_ex(y);
- if (gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
+ if (im->pixels && gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
#if HAVE_LIBGD13
RETURN_LONG(im->pixels[Z_LVAL_PP(y)][Z_LVAL_PP(x)]);
#else