cheprasov / js-qrcode Goto Github PK
View Code? Open in Web Editor NEWThe library is for generating QR codes like SVG, HTML5 Canvas, PNG and JPG files, or text.
License: MIT License
The library is for generating QR codes like SVG, HTML5 Canvas, PNG and JPG files, or text.
License: MIT License
Is it possible to use qrcode.js in a HTML page using <script> tag?
I tried this:
<script type="module" src="~/plugins/js-qrcode/qrcode.js"></script>and also this:
<script type="module"> import { QRCodeCanvas } from '../plugins/js-qrcode/qrcode.js'; </script>but always got JS errors...
Hello, I've tested this library in a react app. I used the react logo as the logo of the QR and it works ok, but for example, if I modify this logo in Photoshop, let's say I add some text to it, and export as png, it will generate que QR with a blank image.
How can we solve this?
Also providing a URL to the source is not working.
Thanks!
Hi,
first of all, great library!
I'm creating an SVG qr-code with a logo, and the logo has transparent background.
The transparency seems not to be kept when passing the image in the options of QRCodeSVG
options = {
...options,
image: {
source: path.resolve(__dirname, getLogoPath(buffer)), // Also tried 'data:image/png;base64,' + buffer.toString('base64'),
width: 100/logoRatio + '%',
height: 100/logoRatio + '%',
x: 'center',
y: 'center',
border: 0
}
}
const qrSVG = new QRCodeSVG(url, options)
the logo path is a local directory where the buffer is saved as PNG (e.g. /tmp/image.png).
I verified that the transparent background is preserved after the buffer is saved in the local directory.
Any help?
Thanks in advance
This is the best QR code library I've found on the entire internet! It has exactly everything I need and works flawlessly.
Thank you for taking the time to build and open-source this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.