#ifdef HAVE_GD_XBM
PHP_FE(imagecreatefromxbm, NULL)
#endif
-#ifdef HAVE_GD_XPM
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
PHP_FE(imagecreatefromxpm, NULL)
#endif
PHP_FE(imagecreatefromgd, NULL)
case PHP_GDIMG_TYPE_GD2PART:
im = (*func_p)(fp, Z_LVAL_PP(srcx), Z_LVAL_PP(srcy), Z_LVAL_PP(width), Z_LVAL_PP(height));
break;
-#ifdef HAVE_GD_XPM
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
case PHP_GDIMG_TYPE_XPM:
im = gdImageCreateFromXpm(fn);
break;
/* }}} */
#endif /* HAVE_GD_XBM */
-#ifdef HAVE_GD_XPM
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
/* {{{ proto int imagecreatefromxpm(string filename)
Create a new image from XPM file or URL */
PHP_FUNCTION(imagecreatefromxpm)
{
zval **IM, **x1, **y1, **x2, **y2, **col;
gdImagePtr im;
- int antialias=0;
if (ZEND_NUM_ARGS() != 6 || zend_get_parameters_ex(6, &IM, &x1, &y1, &x2, &y2, &col) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
convert_to_long_ex(col);
#ifdef HAVE_GD_BUNDLED
- antialias = im->antialias;
-#endif
- if (antialias) {
+ if (im->antialias)
gdImageAALine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col));
- } else {
+ else
+#endif
gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col));
- }
-
gdImageLine(im, Z_LVAL_PP(x1), Z_LVAL_PP(y1), Z_LVAL_PP(x2), Z_LVAL_PP(y2), Z_LVAL_PP(col));
RETURN_TRUE;
}
}
/* }}} */
-#endif
+/* End section: Filters */
/* {{{ proto imagesetantialias(int im, bool on)
Should antialiased functions used or not*/
RETURN_TRUE;
}
/* }}} */
-
-/* End section: Filters */
+#endif
/*
* Local variables:
PHP_FUNCTION(imagecreatefromgif);
PHP_FUNCTION(imagecreatefromjpeg);
PHP_FUNCTION(imagecreatefromxbm);
-PHP_FUNCTION(imagecreatefromxpm);
PHP_FUNCTION(imagecreatefrompng);
PHP_FUNCTION(imagecreatefromwbmp);
PHP_FUNCTION(imagecreatefromgd);
PHP_FUNCTION(imagecreatefromgd2);
PHP_FUNCTION(imagecreatefromgd2part);
+#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
+PHP_FUNCTION(imagecreatefromxpm);
+#endif
PHP_FUNCTION(imagegammacorrect);
PHP_FUNCTION(imagedestroy);