Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cab be possible add a border to QR Codes ? #29

Closed
andrescevp opened this issue Jun 8, 2015 · 5 comments
Closed

Cab be possible add a border to QR Codes ? #29

andrescevp opened this issue Jun 8, 2015 · 5 comments
Assignees

Comments

@andrescevp
Copy link

Just these, because some times some app for read codes needs a border because the background can have colors that make interferences

thanks !

@quantumpacket
Copy link

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.

@andrescevp
Copy link
Author

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

@quantumpacket
Copy link

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.

@andrescevp
Copy link
Author

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 !

@endroid
Copy link
Owner

endroid commented Mar 26, 2016

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

@endroid endroid closed this as completed Mar 26, 2016
@endroid endroid self-assigned this Mar 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants