forked from sumimakito/Awesome-qr.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.js
29 lines (25 loc) · 763 Bytes
/
start.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
let AwesomeQR = require('./awesome-qr-node');
var fs = require('fs');
new AwesomeQR().create({
text: 'https://github.com/Gorniv/Awesome-qr.js',
size: 2636,
backgroundImage: './assets/angular.png',
margin: 0,
typeNumber: 4,
colorDark: "rgba(0, 0, 0, 0.8)",
colorLight: "rgba(255, 255, 255, 1)",
backgroundDimming: 'rgba(0,0,0,0)',
logoCornerRadius: 8,
whiteMargin: true,
dotScale: 0.35,
autoColor: false,
borderDark : "rgba(0, 0, 0, .1)",
borderLight : "rgba(255, 255, 255, .1)",
drawPosition : false,
callback: (data) => {
// binary PNG data
fs.writeFile("test.png", data, "binary", function (err) {
console.log(err);
});
}
});