pajoye          Tue Sep 11 21:10:51 2007 UTC

  Modified files:              
    /php-src/ext/gd     gd.c 
  Log:
  - MFB: alpha support for colorize filter
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.379&r2=1.380&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.379 php-src/ext/gd/gd.c:1.380
--- php-src/ext/gd/gd.c:1.379   Mon Jul 30 21:44:53 2007
+++ php-src/ext/gd/gd.c Tue Sep 11 21:10:51 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gd.c,v 1.379 2007/07/30 21:44:53 pajoye Exp $ */
+/* $Id: gd.c,v 1.380 2007/09/11 21:10:51 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
    Cold Spring Harbor Labs. */
@@ -4601,8 +4601,9 @@
        zval *SIM;
        gdImagePtr im_src;
        long r,g,b,tmp;
+       long a = 0;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &SIM, 
&tmp, &r, &g, &b) == FAILURE) {
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll|l", &SIM, 
&tmp, &r, &g, &b, &a) == FAILURE) {
                RETURN_FALSE;
        }
 
@@ -4612,7 +4613,7 @@
                RETURN_FALSE;
        }
 
-       if (gdImageColor(im_src, (int) r, (int) g, (int) b) == 1) {
+       if (gdImageColor(im_src, (int) r, (int) g, (int) b, (int) a) == 1) {
                RETURN_TRUE;
        }
 
@@ -4721,7 +4722,7 @@
                php_image_filter_smooth
        };
 
-       if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 5) {
+       if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 6) {
                WRONG_PARAM_COUNT;
        } else if (zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) 
== FAILURE) {
                return;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to