SimonScholz / qr-code-with-logo

Create a highly customizable QR code with optional Logo in Kotlin or Java
Apache License 2.0
25 stars 2 forks source link

Can the borders expand to outside? #60

Closed softwaremagico closed 4 months ago

softwaremagico commented 6 months ago

First, thanks for your effort on this library. As it is a good tool for QR codes, and there are not so many for Java.

I have notice that playing around with the border radius, and the border size, in some cases generates QR that are not easy to read in some mobile phones. The issue is that when you expand the border, it overlaps with the QR code that is inside.

It is easily reproducible with the demo application from the project. For example, a qr code with size 500, border size 0.05 and border radius 0.02, causes that the border starts to be attached to the qr code:

qr

But same configuration with different size (600px):

qr

Or 400px:

qr

Works fine.

As you can see, in general works fine, but in other cases not. Not a big issue, as I am choosing the configuration that fits better with my input, but I want you let it know. I also have tried with different content, and always seems that 500px is the combination that causes this issue.

Regards.

SimonScholz commented 6 months ago

Hi @softwaremagico,

I am glad you´ d appreciate the effort put into this library :)

Thanks for sharing the 3 sample qr codes with me. I´ll try to improve this behavior, which might cause maleficent qr codes.

This is the content of the QR CODE, right?

http://localhost/kendo-tournament-backend/tournaments/fights?tournamentId=-100&user=guest

Can you also share the type of Phone you´ re using to scan the qr codes?

My Pixel 6a is fine with all 3 of the qr codes you´ve shared and is capable to read all of them.

softwaremagico commented 6 months ago

I have a Moto G73, but I do not think that is related to the mobile but to the surface that overlaps with the qr code. Let me play around with the settings to try to exaggerate the error, and I will upload a new image with more surface overlapped. Because there are some combinations that can make the qr more difficult to read.

softwaremagico commented 6 months ago

I cannot reproduce any more. In fact, currently the border is below the QR code and cannot hide part of the QR code. I do not know which combination of settings I have used on my previous tests, but the closes I can do now, is the posted image before. That as you are commenting, the quality is good enough to be recognized with any modern mobile.

Sorry for the confusion. Maybe my mobile was lazy before, but now is recognizing any combination of settings.