diff options
| author | Anatol Belski <ab@php.net> | 2013-04-10 20:51:32 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2013-04-10 20:51:32 +0200 |
| commit | b6d54faa92ac7320fd6864a34a01cdffb58f97e0 (patch) | |
| tree | 47c9ad837797df85838bf6bb66561e6bb142c9c5 | |
| parent | 782085bbfbb6fff07c59b3528285bc619ee5847b (diff) | |
| parent | c480bf3fb2f04952f4421df197c58b07b479c1c1 (diff) | |
| download | php-git-b6d54faa92ac7320fd6864a34a01cdffb58f97e0.tar.gz | |
Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
| -rw-r--r-- | ext/gd/config.m4 | 2 | ||||
| -rw-r--r-- | ext/gd/gd.c | 8 | ||||
| -rw-r--r-- | ext/gd/libgd/gd_compat.h | 7 |
3 files changed, 15 insertions, 2 deletions
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 79a74e1408..0e35eceba3 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -283,6 +283,8 @@ AC_DEFUN([PHP_GD_CHECK_VERSION],[ PHP_CHECK_LIBRARY(gd, gdFreeFontCache, [AC_DEFINE(HAVE_GD_FREEFONTCACHE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdFontCacheMutexSetup, [AC_DEFINE(HAVE_GD_FONTMUTEX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) + PHP_CHECK_LIBRARY(gd, gdImageConvolution, [AC_DEFINE(HAVE_GD_IMAGE_CONVOLUTION, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) + PHP_CHECK_LIBRARY(gd, gdImagePixelate, [AC_DEFINE(HAVE_GD_IMAGE_PIXELATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ]) ]) dnl diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 72abbba2bc..0984c878aa 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1261,9 +1261,13 @@ PHP_RSHUTDOWN_FUNCTION(gd) /* }}} */ #if HAVE_GD_BUNDLED -#define PHP_GD_VERSION_STRING "bundled (2.0.34 compatible)" +#define PHP_GD_VERSION_STRING "bundled (2.1.0 compatible)" #else -#define PHP_GD_VERSION_STRING "2.0" +# ifdef GD_VERSION_STRING +# define PHP_GD_VERSION_STRING GD_VERSION_STRING +# else +# define PHP_GD_VERSION_STRING "2.0" +# endif #endif /* {{{ PHP_MINFO_FUNCTION diff --git a/ext/gd/libgd/gd_compat.h b/ext/gd/libgd/gd_compat.h index c084a0069c..779e709a63 100644 --- a/ext/gd/libgd/gd_compat.h +++ b/ext/gd/libgd/gd_compat.h @@ -32,6 +32,7 @@ int gdImageContrast(gdImagePtr src, double contrast); /* Simply adds or substracts respectively red, green or blue to a pixel */ int gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha); +#if !defined(HAVE_GD_IMAGE_CONVOLUTION) /* Image convolution by a 3x3 custom matrix */ int gdImageConvolution(gdImagePtr src, float ft[3][3], float filter_div, float offset); int gdImageEdgeDetectQuick(gdImagePtr src); @@ -40,12 +41,18 @@ int gdImageSelectiveBlur( gdImagePtr src); int gdImageEmboss(gdImagePtr im); int gdImageMeanRemoval(gdImagePtr im); int gdImageSmooth(gdImagePtr im, float weight); +#endif + +#if !defined(HAVE_GD_IMAGE_PIXELATE) enum gdPixelateMode { GD_PIXELATE_UPPERLEFT, GD_PIXELATE_AVERAGE }; int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode); +#endif + +int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode); #if !HAVE_GD_IMAGEELLIPSE void gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int c); |
