summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-04-07 13:07:04 +0000
committerPierre Joye <pajoye@php.net>2009-04-07 13:07:04 +0000
commit855da166ef9fb9fef20b542d95c838d1be7dc7c8 (patch)
treefe9d6118c0d7593f18f84d756a946c3195dfcf2a
parent0e1c4f19927036051d75d5f59b7f1ccaa1d7841f (diff)
downloadphp-git-855da166ef9fb9fef20b542d95c838d1be7dc7c8.tar.gz
- missing implementation gdJpegGetVersionString (thanks Rob)
-rw-r--r--ext/gd/libgd/gd.h3
-rw-r--r--ext/gd/libgd/gd_jpeg.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h
index a186247056..03ed098d8e 100644
--- a/ext/gd/libgd/gd.h
+++ b/ext/gd/libgd/gd.h
@@ -249,6 +249,9 @@ gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile, int ignore_warning);
int gdJpegGetVersionInt();
const char * gdPngGetVersionString();
+int gdJpegGetVersionInt();
+const char * gdJpegGetVersionString();
+
/* A custom data source. */
/* The source function must return -1 on error, otherwise the number
of bytes fetched. 0 is EOF, not an error! */
diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c
index a71469137f..0d9bae151c 100644
--- a/ext/gd/libgd/gd_jpeg.c
+++ b/ext/gd/libgd/gd_jpeg.c
@@ -107,6 +107,18 @@ int gdJpegGetVersionInt()
return JPEG_LIB_VERSION;
}
+const char * gdJpegGetVersionString()
+{
+ switch(JPEG_LIB_VERSION) {
+ case 62:
+ return "6b";
+ break;
+ default:
+ return "unknown";
+ }
+}
+
+
/*
* Write IM to OUTFILE as a JFIF-formatted JPEG image, using quality
* QUALITY. If QUALITY is in the range 0-100, increasing values