Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <errno.h>
- #include <qrencode.h>
- /* gcc -O2 qrc.c -o qrc -lqrencode */
- int main(int argc, char *argv[])
- {
- int i, j;
- if(argc < 2)
- return 0;
- QRcode *qrcode = QRcode_encodeString8bit(argv[1], 0, QR_ECLEVEL_L);
- for(i = 0; i < qrcode->width; i++) {
- for(j = 0; j < qrcode->width; j++)
- printf("%s", qrcode->data[i * qrcode->width + j] & 1 ? "▒▒" : " ");
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement