summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dpng.h2
-rw-r--r--src/png.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/dpng.h b/src/dpng.h
index a9ee8820..fd5119c6 100644
--- a/src/dpng.h
+++ b/src/dpng.h
@@ -7,10 +7,12 @@ extern "C" {
#include "url.h"
#include "image.hh"
+#include "cache.h"
void *a_Png_new(DilloImage *Image, DilloUrl *url, int version);
void a_Png_callback(int Op, CacheClient_t *Client);
+const char *a_Png_version(void);
#ifdef __cplusplus
diff --git a/src/png.c b/src/png.c
index ae3d9f82..2aedc374 100644
--- a/src/png.c
+++ b/src/png.c
@@ -2,6 +2,7 @@
* Copyright Geoff Lane nov 1999 zzassgl@twirl.mcc.ac.uk
* Copyright Luca Rota, Jorge Arellano Cid, Eric Gaudet 2000
* Copyright Jorge Arellano Cid 2009
+ * Copyright (C) 2024 Rodrigo Arias Mallo <rodarima@gmail.com>
*/
/**
@@ -436,6 +437,11 @@ void a_Png_callback(int Op, void *data)
}
}
+const char *a_Png_version(void)
+{
+ return png_get_libpng_ver(NULL);
+}
+
/**
* Create the image state data that must be kept between calls
*/
@@ -465,5 +471,6 @@ void *a_Png_new(DilloImage *Image, DilloUrl *url, int version)
void *a_Png_new() { return 0; }
void a_Png_callback() { return; }
+const char *a_Png_version(void) { return NULL; }
#endif /* ENABLE_PNG */