Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Examples

Animated QR art

Animated QR art example

mkdir -p ./out
qrart "https://qrart.app/" \
  -p ./examples/background-animated.gif \
  -n qrart-lib-art.gif \
  -d ./out

Static QR art

Static QR art example

mkdir -p ./out
qrart "https://qrart.app/" \
  -p ./examples/background.png \
  -c \
  --contrast 1.5 \
  --brightness 1.6 \
  -n qrart-lib-art.png \
  -d ./out

Plain QR

Plain QR example

mkdir -p ./out
qrart "https://qrart.app/" \
  -n qrart-lib-plain.png \
  -d ./out

API

The API returns a JavaScript object that can also be destructured like a tuple:

const { run } = require("qrart-lib");

const result = await run("https://qrart.app/", {
  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://qrart.app/"
qrart "https://qrart.app/" -v 10 -l Q -n qrart_qr.png -d ./out
qrart "https://qrart.app/" -p background.png -c --contrast 1.5 --brightness 1.6

Supported Features

  • Common QR code generation.
  • Artistic QR code generation with .jpg, .jpeg, .png, .bmp, or .gif background 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:

  • qrcode for QR matrix generation.
  • sharp for image processing and output encoding.
  • gif-encoder-2 for animated GIF output.

License

MIT. The visual idea and public workflow are inspired by Amazing-QR. Third-party dependencies keep their own licenses.

About

Nodejs Lib for QR art generation.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages