summaryrefslogtreecommitdiff
path: root/src/jpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jpeg.c')
-rw-r--r--src/jpeg.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/jpeg.c b/src/jpeg.c
index 59234d1d..fb9e0ca5 100644
--- a/src/jpeg.c
+++ b/src/jpeg.c
@@ -2,6 +2,7 @@
* File: jpeg.c
*
* Copyright (C) 2000-2007 Jorge Arellano Cid <jcid@dillo.org>
+ * Copyright (C) 2024 Rodrigo Arias Mallo <rodarima@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -232,6 +233,21 @@ void a_Jpeg_callback(int Op, void *data)
}
}
+const char *a_Jpeg_version(void)
+{
+#define QUOTE(x) #x
+#define STR(x) QUOTE(x)
+
+#if defined(LIBJPEG_TURBO_VERSION)
+ return STR(LIBJPEG_TURBO_VERSION);
+#else
+ return STR(JPEG_LIB_VERSION);
+#endif
+
+#undef STR
+#undef QUOTE
+}
+
/**
* Receive and process new chunks of JPEG image data
*/
@@ -405,5 +421,6 @@ static void Jpeg_write(DilloJpeg *jpeg, void *Buf, uint_t BufSize)
void *a_Jpeg_new() { return 0; }
void a_Jpeg_callback() { return; }
+const char *a_Jpeg_version(void) { return NULL; }
#endif /* ENABLE_JPEG */