diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-11-24 16:25:04 +0100 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-11-24 17:07:17 +0100 |
commit | 5683fc63485590f6f35ed8978899e6d6a0eae4bb (patch) | |
tree | 8a89e432c2434c1ffd258105baa8685c962ee249 | |
parent | 5e753c35a3ef921069eb357b576cc80761f8cbea (diff) |
Add support to read png version
-rw-r--r-- | src/dpng.h | 2 | ||||
-rw-r--r-- | src/png.c | 7 |
2 files changed, 9 insertions, 0 deletions
@@ -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 @@ -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 */ |