返回排行榜

alexeyten/qr-image

JavaScript

Yet another QR code generator

qrcodeqrjavascript
Star 增长趋势
Star
1.1k
Forks
164
周增长
Issues
11
5001k
2023年1月2024年3月2025年5月2026年7月
制品库npmnpm install qr-image
README

qr-image

npm version

This is yet another QR Code generator.

Overview

  • No dependecies;
  • generate image in png, svg, eps and pdf formats;
  • numeric and alphanumeric modes;
  • support UTF-8.

Releases

Installing

npm install qr-image

Usage

Example:

var qr = require('qr-image');

var qr_svg = qr.image('I love QR!', { type: 'svg' });
qr_svg.pipe(require('fs').createWriteStream('i_love_qr.svg'));

var svg_string = qr.imageSync('I love QR!', { type: 'svg' });

Example For generate images in client side:

var qr = require('qr-image');
router.get('/qr', function(){
  var code = qr.image('http://www.google.com', { type: 'png' });
  res.setHeader('Content-type', 'image/png');  //sent qr image to client side
  code.pipe(res);
});

then in the html files:

<img src="/qr" alt="qrcode">

More examples

qr = require('qr-image')

Methods

  • qr.image(text, [ec_level | options]) — Readable stream with image data;
  • 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 of booleans. Y is indexed first (e.g. [y][x] NOT [x][y]), [0][0] is the top left, and true means black.

Options

  • text — text to encode;
  • ec_level — error correction level. One of L, M, Q, H. Default M.
  • options — image options object:
    • ec_level — default M.
    • type — image type. Possible values png (default), svg, pdf and eps.
    • size (png and svg only) — size of one module in pixels. Default 5 for png and undefined for svg.
    • margin — white space around QR image in modules. Default 4 for png and 1 for others.
    • customize (only png) — function to customize qr bitmap before encoding to PNG.
    • parse_url (experimental, default false) — try to optimize QR-code for URLs.

Changes

  • Use zlib.deflateSync instead of pako.
  • Fix deprecation warning for NodeJS 7.

TODO

  • Tests;
  • mixing modes;
  • Kanji (???).
相关仓库
Tamsiree/RxTool

Android开发人员不得不收集的工具类集合 | 支付宝支付 | 微信支付(统一下单) | 微信分享 | Zip4j压缩(支持分卷压缩与加密) | 一键集成UCrop选择圆形头像 | 一键集成二维码和条形码的扫描与生成 | 常用Dialog | WebView的封装可播放视频 | 仿斗鱼滑动验证码 | Toast封装 | 震动 | GPS | Location定位 | 图片缩放 | Exif 图片添加地理位置信息(经纬度) | 蛛网等级 | 颜色选择器 | ArcGis | VTPK | 编译运行一下说不定会找到惊喜

KotlinApache License 2.0dialogprogressbar
12.3k2.8k
x-hw/amazing-qr

💮 amazing QRCode generator in Python (supporting animated gif) - Python amazing 二维码生成器(支持 gif 动态图片二维码)

PythonPyPIGNU General Public License v3.0qrcodegif
10.8k1.6k
claudiodangelis/qrcp

:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.

GoGo ModulesMIT Licenseutilitygolang
qrcp.sh
10.5k546
mrousavy/react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.

TypeScriptnpmMIT Licensereact-nativecamera
visioncamera.margelo.com
9.5k1.4k
bingoogolapple/BGAQRCode-Android

QRCode 扫描二维码、扫描条形码、相册获取图片后识别、生成带 Logo 二维码、支持微博微信 QQ 二维码扫描样式

Cqrcodeqrcode-scanner
8k1.8k
ggerganov/ggwave

Tiny data-over-sound library

C++MIT Licensedata-over-soundsound-library
youtu.be/Zcgf77T71QM
7.8k460
bndw/wifi-card

📶 Print a QR code for connecting to your WiFi (wificard.io)

JavaScriptnpmMIT Licensewifireact
wificard.io
7.2k498
latentcat/qrbtf

AI & parametric QR code generator. AI & 参数化二维码生成器。https://qrbtf.com

TypeScriptnpmGNU General Public License v3.0qrqrcode
qrbtf.com
7k589
mebjas/html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org

TypeScriptnpmApache License 2.0html5qrcode
qrcode.minhazav.dev
6.2k1.1k
zxlie/FeHelper

😍FeHelper--Web前端助手(Awesome!Chrome & Firefox & MS-Edge Extension, All in one Toolbox!)

JavaScriptnpmMIT Licensefehelperjson
fehelper.com
5.6k1.3k
Shane32/QRCoder

A pure C# Open Source QR Code implementation

C#MIT Licenseqrcodec-sharp
5.1k1.2k
endroid/qr-code

PHP QR Code library that helps you create QR codes in a jiffy

PHPPackagistMIT Licenseqrcodedata-uri
endroid.nl
4.8k770