--- embedaddon/php/ext/gd/gd.c 2012/05/29 12:34:39 1.1.1.2 +++ embedaddon/php/ext/gd/gd.c 2014/06/15 20:03:48 1.1.1.5 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.1.1.2 2012/05/29 12:34:39 misho Exp $ */ +/* $Id: gd.c,v 1.1.1.5 2014/06/15 20:03:48 misho Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -129,7 +129,7 @@ int gdImageColorClosestHWB(gdImagePtr im, int r, int g /* IMPORTANT NOTE FOR NEW FILTER * Do not forget to update: * IMAGE_FILTER_MAX: define the last filter index - * IMAGE_FILTER_MAX_ARGS: define the biggest amout of arguments + * IMAGE_FILTER_MAX_ARGS: define the biggest amount of arguments * image_filter array in PHP_FUNCTION(imagefilter) * */ #define IMAGE_FILTER_NEGATE 0 @@ -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 @@ -1328,6 +1332,11 @@ PHP_MINFO_FUNCTION(gd) #endif #if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) php_info_print_table_row(2, "XPM Support", "enabled"); + { + char tmp[12]; + snprintf(tmp, sizeof(tmp), "%d", XpmLibraryVersion()); + php_info_print_table_row(2, "libXpm Version", tmp); + } #endif #ifdef HAVE_GD_XBM php_info_print_table_row(2, "XBM Support", "enabled"); @@ -2821,7 +2830,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAME #if HAVE_GD_BUNDLED PHP_FUNCTION(imagexbm) { - _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_XBM, "GIF", gdImageXbmCtx); + _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_XBM, "XBM", gdImageXbmCtx); } #endif /* }}} */ @@ -2841,7 +2850,7 @@ PHP_FUNCTION(imagegif) Output PNG image to browser or file */ PHP_FUNCTION(imagepng) { - _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_PNG, "GIF", gdImagePngCtxEx); + _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_PNG, "PNG", gdImagePngCtxEx); } /* }}} */ #endif /* HAVE_GD_PNG */ @@ -2852,7 +2861,7 @@ PHP_FUNCTION(imagepng) Output PNG image to browser or file */ PHP_FUNCTION(imagewebp) { - _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WEBP, "GIF", gdImageWebpCtx); + _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WEBP, "WEBP", gdImageWebpCtx); } /* }}} */ #endif /* HAVE_GD_WEBP */ @@ -2863,7 +2872,7 @@ PHP_FUNCTION(imagewebp) Output JPEG image to browser or file */ PHP_FUNCTION(imagejpeg) { - _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_JPG, "GIF", gdImageJpegCtx); + _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_JPG, "JPEG", gdImageJpegCtx); } /* }}} */ #endif /* HAVE_GD_JPG */ @@ -2873,7 +2882,7 @@ PHP_FUNCTION(imagejpeg) Output WBMP image to browser or file */ PHP_FUNCTION(imagewbmp) { - _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "GIF", gdImageWBMPCtx); + _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "WBMP", gdImageWBMPCtx); } /* }}} */ #endif /* HAVE_GD_WBMP */