summaryrefslogtreecommitdiffstats
path: root/cqrlogo.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-07-09 22:47:55 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-07-09 22:47:55 +0200
commitaf713f959f001391fd2a716ec347796015f1df4f (patch)
treef54e1c4064c6cfae51817d6f0fe552ab6078ce2d /cqrlogo.c
parentd0b6d52bc46a054ecff777f9ed226faca48c0551 (diff)
downloadcqrlogo-af713f959f001391fd2a716ec347796015f1df4f.tar.gz
cqrlogo-af713f959f001391fd2a716ec347796015f1df4f.tar.zst
be more verbose about versions used
Diffstat (limited to 'cqrlogo.c')
-rw-r--r--cqrlogo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/cqrlogo.c b/cqrlogo.c
index a9a4a5e..52d216d 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -47,6 +47,11 @@ int generate_png (struct bitmap_t *bitmap, char *http_referer) {
#ifdef PNG_TEXT_SUPPORTED
png_text text[3];
+ char *version;
+ const char *v_libpng = png_libpng_ver, *v_zlib = zlib_version;
+
+ version = malloc(18 + strlen(VERSION) + strlen(v_libpng) + strlen(v_zlib));
+ sprintf(version, VERSION " (libpng %s, zlib %s)", png_libpng_ver, zlib_version);
text[0].compression = PNG_TEXT_COMPRESSION_zTXt;
text[0].key = "comment";
@@ -54,13 +59,14 @@ int generate_png (struct bitmap_t *bitmap, char *http_referer) {
text[1].compression = PNG_TEXT_COMPRESSION_zTXt;
text[1].key = "version";
- text[1].text = VERSION;
+ text[1].text = version;
text[2].compression = PNG_TEXT_COMPRESSION_zTXt;
text[2].key = "referer";
text[2].text = http_referer;
png_set_text(png_ptr, info_ptr, text, 3);
+ free(version);
#endif
row_pointers = png_malloc (png_ptr, bitmap->height * sizeof (png_byte *));