Skip to content

Commit 1b146a4

Browse files
committed
readme: mention png. gh-34
1 parent 6c566c1 commit 1b146a4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Minimal 0-dep QR code generator & reader.
44

55
- 🔒 Auditable, 0-dependency
6-
- 🏞️ Encoding (generating) supports ASCII, term, gif and svg codes
6+
- 🏞️ Encoding (generating) supports ASCII, term, gif, svg and png codes
77
- 📷 Decoding (reading) supports camera feed input, files and non-browser environments
88
- 🔍 Extensive tests ensure correctness: 100MB+ of vectors
99
- 🪶 14KB (gzipped) for encoding + decoding, 7KB for encoding
@@ -52,6 +52,8 @@ const terminalFriendly = encodeQR(txt, 'term'); // 2x larger, all fonts are OK
5252
const gifBytes = encodeQR(txt, 'gif'); // Uncompressed GIF
5353
const svgElement = encodeQR(txt, 'svg'); // SVG vector image element
5454
const array = encodeQR(txt, 'raw'); // 2d array for canvas or other libs
55+
// import { svgToPng } from 'qr/dom.js';
56+
// const png = svgToPng(svgElement, 512, 512); // .png, using DOM
5557

5658
// Options
5759
// Custom error correction level
@@ -135,10 +137,6 @@ function decodeWithExternal() {
135137
const decoded = decodeQR(parseGIF(gifBytes));
136138
console.log('decoded(gif)', decoded);
137139
}
138-
139-
// c) draw gif/svg to browser DOM canvas
140-
import { svgToPng } from 'qr/dom.js';
141-
const png = svgToPng(encodeQR('Hello world', 'svg'), 512, 512);
142140
```
143141

144142
### Decoding options

0 commit comments

Comments
 (0)