Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/qrencode|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. == qrencode [[toc:]] Self-contained high-level bindings to [[http://fukuchi.org/works/qrencode/|libqrencode]]. Does not support structured appending at the moment. === Requirements None === Documentation <procedure> (QR-encode-string string [version] [level] [encoding] [case-sensitive?])</procedure> <procedure> (MQR-encode-string string [version] [level] [encoding] [case-sensitive?])</procedure> Encodes the given string into a QR code. Returns two values: a u8vector containing the pixel values of the QR code (255 for white and 0 for black) and the number of pixels per row/column of the code. {{version}} is the desired QR version (between 0 and 40 or 0 and 4 for Micro QR, with 0 being automatic, defaults to 0). {{level}} is the level of error correction (between 0 and 3, defaults to 2). {{encoding}} is the encoding type and should be one of {{#:numeric}}, {{#:alpha-numeric}}, {{#:8-bit}}, {{#:kanji}}, {{#:eci}}, {{#:fnc-first}}, or {{#:fnc-second}} (defaults to {{#:8-bit}}). {{case-sensitive?}} is a boolean, defaulting to {{#t}}. The {{string}} must be short enough to be encoded using the given {{version}}, {{level}}, {{encoding}}, and {{case-sensitive?}}. Otherwise an error will be thrown. {{MQR-encode-string}} is the Micro QR version of {{QR-encode-string}}. <procedure> (MQR-encode-string-8bit string [version] [level])</procedure> <procedure> (QR-encode-string-8bit string [version] [level])</procedure> Encodes the given string into a QR code in 8 bit mode. Returns two values: a u8vector containing the pixel values of the QR code (255 for white and 0 for black) and the number of pixels per row/column of the code. {{version}} is the desired QR version (between 0 and 40 or 0 and 4 for Micro QR, with 0 being automatic, defaults to 0). {{level}} is the level of error correction (between 0 and 3, defaults to 2). The {{string}} must be short enough to be encoded using the given {{version}} and {{level}}. Otherwise an error will be thrown. {{MQR-encode-string-8bit}} is the Micro QR version of {{QR-encode-string-8bit}}. <procedure> (QR-encode-data u8vector [version] [level])</procedure> <procedure> (MQR-encode-data u8vector [version] [level])</procedure> Encodes the given u8vector into a QR code. Returns two values: a u8vector containing the pixel values of the QR code (255 for white and 0 for black) and the number of pixels per row/column of the code. {{version}} is the desired QR version (between 0 and 40 or 0 and 4 for Micro QR, with 0 being automatic, defaults to 0). {{level}} is the level of error correction (between 0 and 3, defaults to 2). The {{data}} must be short enough to be encoded using the given {{version}} and {{level}}. Otherwise an error will be thrown. {{MQR-encode-data}} is the Micro QR version of {{QR-encode-data}}. === Examples <enscript highlight="scheme"> (QR-encode-string "hello world!") </enscript> You can also try running {{./examples/encode-ascii.scm "STRING TO ENCODE"}} to create an ASCII QR code, like so: <enscript highlight="text"> ############## ## ######## ############## ## ## ## ## #### ## ## ## ###### ## ## ######## ## ###### ## ## ###### ## ## ## ## #### ## ###### ## ## ###### ## #### ######## ## ###### ## ## ## ## #### ## ## ############## ## ## ## ## ## ############## #### ######## ## #### ###### ###### ## #### ###### ## ## ## #### ## ## ## ## ######## #### ########## #### ## ###### ## ## ###### ## #### ## #### ## ## ## ###### ## ## #### ## ## #### ## ######## ## ###################### ## ######## ## #### ## ###### ######## ######## ## ## ###### ## ############ ## ## ## ## ## ## ## ############## ## #### #### ## #### ## ## ## #### ## ## ## #### ## ###### ## ###### ################ #### ## ###### ## ######## ## ## #### ## ## ###### ## ## ## ###### #### ## ## #### ## #### #### ###### ############## ###### #### ## ########## </enscript> === Version history ==== Version 0.1.0 * Initial release === Source repository Source available on [[https://github.com/AlexCharlton/qrencode|GitHub]]. Bug reports and patches welcome! Bugs can be reported via GitHub or to alex.n.charlton at gmail. === Author Alex Charlton === License BSD-2-Clause
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you subtract 16 from 2?