1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 03:32:20 +02:00

- MFB: initial import, support for external gd library while keeping bug fixes or features (more will be activated later)

This commit is contained in:
Pierre Joye
2009-04-07 09:43:53 +00:00
parent b6106b6293
commit 086765ff17
2 changed files with 40 additions and 0 deletions

35
ext/gd/libgd/gd_compat.c Normal file
View File

@@ -0,0 +1,35 @@
#include "php_config.h"
#ifdef HAVE_GD_PNG
/* needs to be first */
# include <png.h>
#endif
#ifdef HAVE_GD_JPG
# include <jpeglib.h>
#endif
#ifdef HAVE_GD_JPG
int gdJpegGetVersionInt()
{
return JPEG_LIB_VERSION;
}
int gdJpegGetVersionString()
{
switch(JPEG_LIB_VERSION) {
case 62:
return "6b";
break;
default:
return "unknown";
}
}
#endif
#ifdef HAVE_GD_PNG
const char * gdPngGetVersionString()
{
return PNG_LIBPNG_VER_STRING;
}
#endif

5
ext/gd/libgd/gd_compat.h Normal file
View File

@@ -0,0 +1,5 @@
const char * gdPngGetVersionString();
int gdJpegGetVersionString();
int gdJpegGetVersionInt();
int overflow2(int a, int b);