diff options
Diffstat (limited to 'ext/gd/gd.c')
| -rw-r--r-- | ext/gd/gd.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index dc53a349ea..4c051a13d6 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -29,11 +29,6 @@ #include "config.h" #endif -#ifdef HAVE_GD_PNG -/* needs to be first */ -#include <png.h> -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/head.h" @@ -60,6 +55,15 @@ #if HAVE_LIBGD +#ifdef HAVE_GD_PNG +/* needs to be first */ +# include <png.h> +#endif + +#ifdef HAVE_GD_JPG +# include <jpeglib.h> +#endif + static int le_gd, le_gd_font; #if HAVE_LIBT1 #include <t1lib.h> @@ -1328,15 +1332,15 @@ PHP_MINFO_FUNCTION(gd) #endif #ifdef HAVE_GD_JPG { - char tmp[256]; - snprintf(tmp, sizeof(tmp), "%d", JPEG_LIB_VERSION); + char tmp[12]; + snprintf(tmp, sizeof(tmp), "%d", gdJpegGetVersionInt()); php_info_print_table_row(2, "JPG Support", "enabled"); php_info_print_table_row(2, "libJPEG Version", tmp); } #endif #ifdef HAVE_GD_PNG php_info_print_table_row(2, "PNG Support", "enabled"); - php_info_print_table_row(2, "libPNG Version", PNG_LIBPNG_VER_STRING); + php_info_print_table_row(2, "libPNG Version", gdPngGetVersionString()); #endif php_info_print_table_row(2, "WBMP Support", "enabled"); #if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED) |
