summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-08-13 09:51:56 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-08-13 09:51:56 +0200
commit6633c129a271b45dab908816293668e4077f17fc (patch)
treec4cd03f98284678c3c094448945cd267be12bee8
parent5529f56ffd79c37b74e86c26127bdbc13bc1d005 (diff)
downloadcqrlogo-6633c129a271b45dab908816293668e4077f17fc.tar.gz
cqrlogo-6633c129a271b45dab908816293668e4077f17fc.tar.zst
make referer information in PNG file optional and configurable
-rw-r--r--config.def.h2
-rw-r--r--cqrlogo.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index cdd9b86..a60c448 100644
--- a/config.def.h
+++ b/config.def.h
@@ -26,3 +26,5 @@
#define PNG_ENABLE_TEXT 1
/* do you want version information within the PNG file? */
#define PNG_ENABLE_TEXT_VERSIONS 1
+/* add referer information to the PNG file? */
+#define PNG_ENABLE_TEXT_REFERER 1
diff --git a/cqrlogo.c b/cqrlogo.c
index 9e4521b..9ebad37 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -68,7 +68,9 @@ int generate_png (struct bitmap_t *bitmap, const char *uri) {
png_text *pngtext = NULL;
pngtext = add_png_text(pngtext, &textcount, "comment", "QR-Code created by cqrlogo - https://github.com/eworm-de/cqrlogo");
+# if PNG_ENABLE_TEXT_REFERER
pngtext = add_png_text(pngtext, &textcount, "referer", (char *)uri);
+# endif
# if PNG_ENABLE_TEXT_VERSIONS
# define VERSIONSTR VERSION " (" __DATE__ ", " __TIME__ ")"