Giter Site home page Giter Site logo

Comments (5)

quantumpacket avatar quantumpacket commented on May 18, 2024

Why don't you just use CSS to add a border to the QR code?

<img src='images/qrcode.php' style='border: 5px solid COLOR'>

Where COLOR is a color that does not conflict with the current background.

from qr-code.

andrescevp avatar andrescevp commented on May 18, 2024

Yes, I use it, but the issue is if you download the code you don't have the border.

from qr-code.

quantumpacket avatar quantumpacket commented on May 18, 2024

If the user is downloading the image, then you lose all control of what background color they will have it set against, and any border set will be as useful as setting no border. You can always change the background color of the image opposed to setting a border, but still the same issue would happen if downloaded.

Just set a large enough padding, maybe?

$qrCode->setPadding(35); // 35px

Can you provide an example screenshot of a image with no border causing "interferences"? I've never come across a QR code that does not scan due to background color differences.

from qr-code.

andrescevp avatar andrescevp commented on May 18, 2024

Uffff I don't have any example ! but it's just a suggestion, if it's not possible no problem, the main is that the lib have a option to define a border in the image will can very nice !

from qr-code.

endroid avatar endroid commented on May 18, 2024

Recently the setDrawBorder() method was added that allows you to add a border to the generated code.

from qr-code.

Related Issues (20)

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.