canvas-qr
qrcode creator based on node-canvas and qr-js
important: install Cairo first
install Cairo first, For system-specific installation view the Wiki from node-canvas
features
- return canvas object, use buffer or stream is your choice
- 5 layers at most: base background, background color, background image, qrcode, logo image
install
npm i canvas-qr
use
var assert = cq = qr = cqqrfs = { return { //arguments to array var $_len = argumentslength var args = $_len forvar $_i = 0; $_i < $_len; ++$_i args$_i = arguments$_i var ctx = this return { args thunk } }}readFile = co = Canvas = cqCanvasImage = CanvasImage { var bgImageFile = var bgImage = var logoImageFile = var logoImage = var cvs bgImagesrc = bgImageFile logoImagesrc = logoImageFile cvs = return { cvs } } //for koa, use streamapp //for express, use pngDataapp
changelog
- 0.2.0 use canvas 1.3.15
- 0.1.3 use canvas 1.2.9 compatible with node v4
- 0.1.1 change licence to MIT, fix readme dependency
- 0.0.4 set default ecc level = 'M'
- 0.0.3 just change readme, nothing else
LICENSE
MIT