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:
35
ext/gd/libgd/gd_compat.c
Normal file
35
ext/gd/libgd/gd_compat.c
Normal 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
5
ext/gd/libgd/gd_compat.h
Normal file
@@ -0,0 +1,5 @@
|
||||
const char * gdPngGetVersionString();
|
||||
int gdJpegGetVersionString();
|
||||
int gdJpegGetVersionInt();
|
||||
int overflow2(int a, int b);
|
||||
|
||||
Reference in New Issue
Block a user