qrart-lib
v2.0.0
Published
QR art generator for Node.js
Maintainers
Readme
qrart-lib
QR art generator for Node.js.
This project is inspired by x-hw/amazing-qr,
but is implemented for a native Node.js runtime using qrcode, sharp, and gif-encoder-2.
The API returns a JavaScript object that can also be destructured like a tuple:
const { run } = require("qrart-lib");
const result = await run("https://github.com", {
version: 1,
level: "H",
picture: null,
colorized: false,
contrast: 1.0,
brightness: 1.0,
saveName: "qrcode.png",
saveDir: process.cwd(),
});
console.log(result.version, result.level, result.qrName);
const [version, level, qrName] = result;CLI
qrart "https://github.com"
qrart "https://github.com" -v 10 -l Q -n github_qr.png -d ./out
qrart "https://github.com" -p background.png -c --contrast 1.5 --brightness 1.6Supported Features
- Common QR code generation.
- Artistic QR code generation with
.jpg,.jpeg,.png,.bmp, or.gifbackground files. - Black-and-white or colorized output.
- Contrast and brightness controls.
- CLI flags matching the common QR-art workflow.
The implementation uses native Node dependencies:
qrcodefor QR matrix generation.sharpfor image processing and output encoding.gif-encoder-2for animated GIF output.
License
MIT. The visual idea and public workflow are inspired by Amazing-QR. Third-party dependencies keep their own licenses.
