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

Corner radius for barcode data #331

Closed
UVLabs opened this issue Jun 24, 2021 · 5 comments
Closed

Corner radius for barcode data #331

UVLabs opened this issue Jun 24, 2021 · 5 comments

Comments

@UVLabs
Copy link

UVLabs commented Jun 24, 2021

Is it possible to create barcodes with corner radius like this?

Screenshot 2021-06-24 at 11 30 59 AM

You can see this in action here: https://larsjung.de/jquery-qrcode/latest/demo/
https://larsjung.de/jquery-qrcode/

Other customization ideas can be seen here:

https://larsjung.de/jquery-qrcode/
https://larsjung.de/kjua/

@endroid
Copy link
Owner

endroid commented Jun 27, 2021

Hi @UVLabs thank you for your suggestion. looks like a nice addition. I don't have the time to do this myself but I will mark this as an opportunity for contribution.

@syntaxgirl
Copy link

Hey @endroid, I would like to do this, also I would like to add possibility to change corner shape, to add an overlay if possible. What's the best place to start checking the code for such features to implement?

@endroid
Copy link
Owner

endroid commented Feb 9, 2022

Hi @syntaxgirl you could create your own writer, like the ones created here https://github.com/endroid/qr-code/tree/master/src/Writer. As you can see in the PngWriter you can start by retrieving the matrix and then use that to build your drawing logic on. For the PNG writer this is a simple loop but for determining if you want round corners you probably want to check adjacent cells. Good luck!

@endroid
Copy link
Owner

endroid commented Oct 4, 2022

I'm closing this ticket because of lack of input. However if anyone still wants to add this feature, feel free to reopen / make a PR.

@endroid endroid closed this as completed Oct 4, 2022
@bartoszswiety
Copy link

challenge accepted.

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

4 participants