summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-06-04 18:47:44 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-06-04 18:47:44 +0200
commit81e22becffcccf98e89a2c7ec5d33c4d12f8e9ed (patch)
treec259ae2b7ef9458abc0eae1fb37777858a319893
parent7b02d879190826e07858a3c83139f7f6a5b67f3f (diff)
downloadcqrlogo-81e22becffcccf98e89a2c7ec5d33c4d12f8e9ed.tar.gz
cqrlogo-81e22becffcccf98e89a2c7ec5d33c4d12f8e9ed.tar.zst
add comments abount defines
-rw-r--r--cqrlogo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cqrlogo.c b/cqrlogo.c
index f1ef1ae..5ed5a4c 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -13,7 +13,14 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <qrencode.h>
+/* pixels are scaled up by this factor */
#define QRCODE_SCALE 2
+/* error correction level used for QR code
+ * possible values: QR_ECLEVEL_L (lowest, about 7% error can be corrected)
+ * QR_ECLEVEL_M (about 15%)
+ * QR_ECLEVEL_Q (about 25%)
+ * QR_ECLEVEL_H (highest, about 30%)
+ * image size raises with higher levels */
#define QRCODE_LEVEL QR_ECLEVEL_L
GdkPixbuf * encode_qrcode (char *text) {