alexzhirkevich / custom-qr-generator

Android library for creating QR codes with logo, custom shapes, colors, background image. Powered by ZXing
MIT License
173 stars 18 forks source link

Is the size of the positioning markings adjustable? #40

Closed MariusBudin closed 1 year ago

MariusBudin commented 1 year ago

Describe the option you are trying to implement I want to create QR code with smaller positioning markings (the 3 shapes on the top left and right and bottom left)

Is there any way to adjust the size of them and let the content grow a bit more?

Thanks for the library! Awesome job!

alexzhirkevich commented 1 year ago

The size of positional eyes is defined by QR code standard - 7 dots. You can make its middle ball smaller/bigger and frame stoke thinner/thicker but not the size of it in general

alexzhirkevich commented 1 year ago

Technically you can create custom shapes and use any size you want for it ignoring one that comes as a parameter, but there is no guarantee you would able to scan such a code

alexzhirkevich commented 1 year ago

And in v2.0 alpha there is a magic function scale that you can apply to any shape and by combining it with .asBallShape() / .asFrameShape you can create nice scaled shapes with center pivot. But again this can negatively reflect on the functionality of this code

MariusBudin commented 1 year ago

Understood, thank you very much for your replies! 🍻 The issue I had was data was too small so there were few dots and large positioning markings and it looked a bit weird. I've added some correction level so it generates more points and it pushed them a bit and scaled down, and looks better now. Good info you shared, I'll try to avoid it for now, just to make sure I'm not affecting functionality for aesthetics