cvs: php4 /ext/gd gd.c
| From: | Andi Gutmans | Date: | Tue, 22 Aug 2000 04:11:57 +0000 |
| Subject: | cvs: php4 /ext/gd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1306@lists.php.net to get a copy of this message | ||
andi Mon Aug 21 21:11:57 2000 EDT
Modified files:
/php4/ext/gd gd.c
Log:
- Cleanup imagetransparent in the GD library
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.84 php4/ext/gd/gd.c:1.85
--- php4/ext/gd/gd.c:1.84 Mon Aug 21 07:11:19 2000
+++ php4/ext/gd/gd.c Mon Aug 21 21:11:57 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.84 2000/08/21 14:11:19 stas Exp $ */
+/* $Id: gd.c,v 1.85 2000/08/22 04:11:57 andi Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1391,7 +1391,7 @@
Define a color as transparent */
PHP_FUNCTION(imagecolortransparent)
{
- zval **IM, **COL = NULL;
+ zval **IM, **COL;
gdImagePtr im;
int col;
GDLS_FETCH();
@@ -1414,9 +1414,8 @@
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", GDG(le_gd));
- if (COL != NULL && (*COL) != NULL) {
- col = (*COL)->value.lval;
- gdImageColorTransparent(im,col);
+ if (ZEND_NUM_ARGS() > 1) {
+ gdImageColorTransparent(im, Z_LVAL_PP(COL));
}
col = gdImageGetTransparent(im);
RETURN_LONG(col);