This is yet another QR Code generator.
- No dependecies;
- generate image in
png,svg,epsandpdfformats; - numeric and alphanumeric modes;
- support UTF-8.
Example:
var qr = require('qr-image');
var qr_svg = qr.image('I love QR!', { type: 'svg' });
qr_svg.pipe(require('fs').createWriteStream('i_love_qr.svg'));
qr = require('qr-image')
qr.image(text, [ec_level | options]) — returns Readable stream with image data.
qr.matrix(text, [ec_level]) — returns 2D array.
text— text to encode;ec_level— error correction level. One ofL,M,Q,H. DefaultM.options— image options object:ec_level— defaultM.type— image type. Possible valuespng(default),svg(svgPath),pdfandeps.size(only png) — size of one module in pixels. Default5.margin(only png) — white space around QR image in modules. Default4.customize(only png) — function to customize qr bitmap before encoding to PNG.
svgPath is not really an image, but content of d attribute of corresponding SVG image.
- Tests;
- mixing modes;
- Kanji (???).