Skip to content

Commit

Permalink
Version 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyten committed Jan 24, 2015
1 parent 3638f9a commit 8579d45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var svg_string = qr.imageSync('I love QR!', { type: 'svg' });
### Methods

* `qr.image(text, [ec_level | options])` — Readable stream with image data;
* `qr.imageSync(text, [ec_level | options])` — string with image data. (not implemented for `png`);
* `qr.imageSync(text, [ec_level | options])` — string with image data. (Buffer for `png`);
* `qr.svgObject(text, [ec_level | options])` — object with SVG path and size;
* `qr.matrix(text, [ec_level])` — 2D array.

Expand All @@ -53,15 +53,12 @@ var svg_string = qr.imageSync('I love QR!', { type: 'svg' });
Changes
-------

* `size` option is also used for SVG.
* Add experimental `parse_url` option. First attemt to mix modes.
* Fix weird bug witch CRC32 calculation on Raspberry Pi.
* Implement `imageSync` for `png`.


TODO
----

* Tests;
* `imageSync` for `png`.
* mixing modes;
* Kanji (???).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qr-image",
"version": "3.0.2",
"version": "3.1.0",
"description": "QR Code generator (png, svg, pdf, eps)",
"homepage": "https://github.com/alexeyten/qr-image",
"keywords": [ "qrcode", "qr code", "qr", "png", "svg", "image" ],
Expand Down
21 changes: 1 addition & 20 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,4 @@ qr.image(text, { type: 'svg', ec_level: ec_level}).pipe(file('qr.svg'));
qr.image(text, { type: 'eps', ec_level: ec_level}).pipe(file('qr.eps'));
qr.image(text, { type: 'pdf', ec_level: ec_level}).pipe(file('qr.pdf'));

/*
var raw = fs.readFileSync(__dirname + '/emblem.raw');
raw.w = 45;
raw.h = 35;
qr.image(text, {
type: 'png',
ec_level: 'H',
size: 5,
margin: 4,
customize: function(data) {
var x = (data.size - raw.w) / 2;
var y = (data.size - raw.h) / 2;
for (var i = 0; i < raw.h; i++) {
var offset = (y + i) * (data.size + 1) + x + 1;
raw.copy(data.data, offset, i * raw.w, (i + 1) * raw.w);
}
}
}).pipe(file('qr-emblem.png'));
*/
fs.writeFileSync('qr_sync.png', qr.imageSync(text));

0 comments on commit 8579d45

Please # to comment.