Fantastisches Community-Modul

QR Code Generator für Fibjs

Installation

1
$ npm install fib-qr

Verwendung

1 2 3 4 5 6 7 8 9 10 11 12
var fs = require("fs"); var gd = require("gd"); var QRCode = require("fib-qr"); var opt = { width: 800, height: 800 }; var qrcode = new QRCode(opt); var imgbase = qrcode.makeCode("http://fibjs.org/"); fs.writeFile("test.jpg", imgbase.getData(gd.JPEG));

Standardoptionen:

1 2 3 4 5 6 7 8
this._htOption = { width: 512, height: 512, typeNumber: 4, colorDark: 0, colorLight: 0xffffff, correctLevel: QRCode.CorrectLevel.H };