https://github.com/vmchale/qr-writer
Haskell library for writing QR codes to file
https://github.com/vmchale/qr-writer
Last synced: 9 months ago
JSON representation
Haskell library for writing QR codes to file
- Host: GitHub
- URL: https://github.com/vmchale/qr-writer
- Owner: vmchale
- License: bsd-3-clause
- Created: 2016-12-08T17:58:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T21:27:51.000Z (almost 7 years ago)
- Last Synced: 2025-04-04T08:01:33.160Z (9 months ago)
- Language: Haskell
- Size: 154 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QR Imager Library
[](https://travis-ci.org/vmchale/QR-writer)
This is a library to generate `.png` files from QR codes.
## Dependencies
The library depends on the C library [libqrencode](https://github.com/fukuchi/libqrencode) which you will need to install separately, as well as the command-line tool `Zbar` from [here](https://github.com/ZBar/ZBar). You should also be able to get them from your distro.
## Library
The library can be used via the exported functions `createQRCode`, `byteStringToQR` and `readQRString`, plus their signed counterparts. The first two export to ".png" while the third can be used on any image format `Zbar` supports.
The functions `bsToImg` and `objToImg` output JuicyPixels images for your further manipulation.
### Use
Compiling will generate an executable called `qrpipe` which reads from `stdin` and outputs a file as the second argument, e.g.
```
echo 'My name is: Vanessa" | qrpipe write -v "nametag.png"
```
To then read the nametag:
```
qrpipe read "nametag.png"
```