Skip to content

pipobscure/qrpng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR-PNG NPM

This is a very simple QR-Code generator that outputs a PNG-Buffer. It's written in pure JavaScript.

Usage

    import qrcode from 'qrpng;

    const uint8array = qrcode('my text for the code');
    document.getElementById('qrimg').src = 'image/png;base64,' + btoa(String.fromCharCode.apply(null, uint8array));

It has only one function:

function generate(content[, scale])

scale is the pixel extent of a QR-Code data pixel.

Install

npm install qrpng

License

This uses "QRCode for JavaScript" which Kazuhiko Arase thankfully MIT licensed.

© 2025 Philipp Dunkel pip@pipobscure.com EUPL v1.2

About

QR-Code generator that outputs a PNG-Buffer

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors