summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/libgd/gd_compat.c')
-rw-r--r--ext/gd/libgd/gd_compat.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd_compat.c b/ext/gd/libgd/gd_compat.c
new file mode 100644
index 0000000..473ea20
--- /dev/null
+++ b/ext/gd/libgd/gd_compat.c
@@ -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;
+}
+
+const char * 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
+