iliaa           Tue Dec 10 14:45:59 2002 EDT

  Modified files:              
    /php4/ext/gd        gd.c 
  Log:
  Fixed build with GD 1.8.4
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.236 php4/ext/gd/gd.c:1.237
--- php4/ext/gd/gd.c:1.236      Tue Dec 10 12:57:41 2002
+++ php4/ext/gd/gd.c    Tue Dec 10 14:45:58 2002
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gd.c,v 1.236 2002/12/10 17:57:41 iliaa Exp $ */
+/* $Id: gd.c,v 1.237 2002/12/10 19:45:58 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
    Cold Spring Harbor Labs. */
@@ -162,7 +162,6 @@
        PHP_FE(imagepalettecopy,                                                NULL)
        PHP_FE(imagecreatefromstring,                                   NULL)
 #endif
-       PHP_FE(imageistruecolor,                                                NULL)
        PHP_FE(imagecolorclosest,                                               NULL)
 #if HAVE_COLORCLOSESTHWB
        PHP_FE(imagecolorclosesthwb,                                    NULL)
@@ -183,6 +182,7 @@
        PHP_FE(imagecreate,                                                            
 NULL)
 #if HAVE_LIBGD20
        PHP_FE(imagecreatetruecolor,                                    NULL)
+       PHP_FE(imageistruecolor,                                        NULL)
        PHP_FE(imagetruecolortopalette,                                 NULL)
        PHP_FE(imagesetthickness,                                               NULL)
        PHP_FE(imagefilledarc,                                                  NULL)
@@ -776,6 +776,23 @@
 }
 /* }}} */
 
+/* {{{ proto int imageistruecolor(int im)
+   return true if the image uses truecolor */
+PHP_FUNCTION(imageistruecolor)
+{
+       zval **IM;
+       gdImagePtr im;
+
+       if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
+               ZEND_WRONG_PARAM_COUNT();
+       }
+       
+       ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
+
+       RETURN_BOOL(im->trueColor);
+}
+/* }}} */
+
 /* {{{ proto void imagetruecolortopalette(resource im, bool ditherFlag, int 
colorsWanted)
    Convert a true colour image to a palette based image with a number of colours, 
optionally using dithering. */
 PHP_FUNCTION(imagetruecolortopalette)
@@ -1755,22 +1772,6 @@
 }
 /* }}} */
 
-/* {{{ proto int imagecolorallocate(int im, int red, int green, int blue)
-   Allocate a color for an image */
-PHP_FUNCTION(imageistruecolor)
-{
-       zval **IM;
-       gdImagePtr im;
-
-       if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
-               ZEND_WRONG_PARAM_COUNT();
-       }
-       
-       ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
-
-       RETURN_BOOL(im->trueColor);
-}
-/* }}} */
 
 /* {{{ proto int imagecolorallocate(int im, int red, int green, int blue)
    Allocate a color for an image */



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

Reply via email to