Skip to content

前端实现二维码的解析,能处理各种格式(jpg、png、jpeg)的图片以及大于5M的大图片,兼容性较好

Notifications You must be signed in to change notification settings

zhengxiaocao/zxc-qrcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

zxc-qrcode

前端实现二维码的解析,能处理各种格式(jpg、png、jpeg)的图片以及大于5M的大图片,兼容性较好

Installation

# install qrcode-parser    // 解码主库
npm i qrcode-parser

# install lrz          // 压缩图片的库
npm i lrz

Usage

# import package
import gzip from "lrz";
import qrcodeParser from "qrcode-parser";

// 压缩图片
const gzipImg = await gzip(URL.createObjectURL(file.raw));

// 解析二维码
this.msg = await qrcodeParser(pngBase64);

About

前端实现二维码的解析,能处理各种格式(jpg、png、jpeg)的图片以及大于5M的大图片,兼容性较好

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published