Giter Site home page Giter Site logo

js-qrcode's People

Contributors

cheprasov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

js-qrcode's Issues

How to use in plain HTML javascript?

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...

QR not showing custom images

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!

Logo transparency

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

Thank you for making this library

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.