{"id":13446115,"url":"https://github.com/alexeyten/qr-image","last_synced_at":"2025-05-14T12:11:44.276Z","repository":{"id":14347756,"uuid":"17057343","full_name":"alexeyten/qr-image","owner":"alexeyten","description":"Yet another QR code generator","archived":false,"fork":false,"pushed_at":"2024-02-23T07:19:13.000Z","size":110,"stargazers_count":1056,"open_issues_count":15,"forks_count":167,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-05-13T12:47:41.443Z","etag":null,"topics":["javascript","qr","qrcode"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexeyten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-21T13:45:20.000Z","updated_at":"2025-05-06T15:19:34.000Z","dependencies_parsed_at":"2024-06-18T11:26:22.053Z","dependency_job_id":null,"html_url":"https://github.com/alexeyten/qr-image","commit_stats":{"total_commits":43,"total_committers":10,"mean_commits":4.3,"dds":0.3023255813953488,"last_synced_commit":"9b5ee0e8f38152f29cfd59eedaf037fafb47e740"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyten%2Fqr-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyten%2Fqr-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyten%2Fqr-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyten%2Fqr-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexeyten","download_url":"https://codeload.github.com/alexeyten/qr-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254140768,"owners_count":22021220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","qr","qrcode"],"created_at":"2024-07-31T05:00:46.008Z","updated_at":"2025-05-14T12:11:39.262Z","avatar_url":"https://github.com/alexeyten.png","language":"JavaScript","funding_links":[],"categories":["Libraries","Uncategorized","JavaScript","graphic (图形库)","Tools"],"sub_categories":["QR code","Uncategorized","WebTools"],"readme":"qr-image\n========\n\n[![npm version](https://badge.fury.io/js/qr-image.svg)](https://badge.fury.io/js/qr-image)\n\nThis is yet another QR Code generator.\n\nOverview\n--------\n\n  * No dependecies;\n  * generate image in `png`, `svg`, `eps` and `pdf` formats;\n  * numeric and alphanumeric modes;\n  * support UTF-8.\n\n[Releases](https://github.com/alexeyten/qr-image/releases/)\n\n\nInstalling\n-----\n\n```shell\nnpm install qr-image\n```\n\nUsage\n-----\n\nExample:\n```javascript\nvar qr = require('qr-image');\n\nvar qr_svg = qr.image('I love QR!', { type: 'svg' });\nqr_svg.pipe(require('fs').createWriteStream('i_love_qr.svg'));\n\nvar svg_string = qr.imageSync('I love QR!', { type: 'svg' });\n```\n\nExample For generate images in client side:\n```javascript in your app.js\nvar qr = require('qr-image');\nrouter.get('/qr', function(){\n  var code = qr.image('http://www.google.com', { type: 'png' });\n  res.setHeader('Content-type', 'image/png');  //sent qr image to client side\n  code.pipe(res);\n});\n```\nthen in the html files:\n```\n\u003cimg src=\"/qr\" alt=\"qrcode\"\u003e\n```\n\n[More examples](./examples)\n\n`qr = require('qr-image')`\n\n### Methods\n\n  * `qr.image(text, [ec_level | options])` — Readable stream with image data;\n  * `qr.imageSync(text, [ec_level | options])` — string with image data. (Buffer for `png`);\n  * `qr.svgObject(text, [ec_level | options])` — object with SVG path and size;\n  * `qr.matrix(text, [ec_level])` — 2D array of booleans. __Y__ is indexed first (e.g. `[y][x]` NOT `[x][y]`), `[0][0]` is the top left, and `true` means black.\n\n\n### Options\n\n  * `text` — text to encode;\n  * `ec_level` — error correction level. One of `L`, `M`, `Q`, `H`. Default `M`.\n  * `options` — image options object:\n    * `ec_level` — default `M`.\n    * `type` — image type. Possible values `png` (default), `svg`, `pdf` and `eps`.\n    * `size` (png and svg only) — size of one module in pixels. Default `5` for png and `undefined` for svg.\n    * `margin` — white space around QR image in modules. Default `4` for `png` and `1` for others.\n    * `customize` (only png) — function to customize qr bitmap before encoding to PNG.\n    * `parse_url` (experimental, default `false`) — try to optimize QR-code for URLs.\n\nChanges\n-------\n\n  * Use `zlib.deflateSync` instead of `pako`.\n  * Fix deprecation warning for NodeJS 7.\n\n\nTODO\n----\n\n  * Tests;\n  * mixing modes;\n  * Kanji (???).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeyten%2Fqr-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexeyten%2Fqr-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeyten%2Fqr-image/lists"}