Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fibjs/fib-qr
QR Code Generator for fibjs
https://github.com/fibjs/fib-qr
qrcode
Last synced: 3 months ago
JSON representation
QR Code Generator for fibjs
- Host: GitHub
- URL: https://github.com/fibjs/fib-qr
- Owner: fibjs
- License: mit
- Created: 2017-01-19T13:17:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-02T12:27:37.000Z (over 7 years ago)
- Last Synced: 2024-07-02T14:42:07.902Z (4 months ago)
- Topics: qrcode
- Language: JavaScript
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
- awesome - fib-qr - QR Code Generator for fibjs. (Packages / Encode/Decode)
README
## QR Code Generator for fibjs
## Installation
``` bash
$ npm install fib-qr
```## Usage
``` JavaScript
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));
```default options:
``` JavaScript
this._htOption = {
width: 512,
height: 512,
typeNumber: 4,
colorDark: 0,
colorLight: 0xffffff,
correctLevel: QRCode.CorrectLevel.H
};
```