-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Logo insert after QRCode unable to scan #397
Comments
You should increase the quality of the qrcode, to have more repetition of
the data in the code. This is going to help if you then hide some of it
with an image.
Good try.
Le jeu. 5 mai 2022 à 05:59, Supun Silva ***@***.***> a écrit :
… I have added a non-transparent Bitmap as a logo. Then I am not able to
scan the QRCode. I guess, because of the center logo, some of the QRCode
pixels are hidden.
Bitmap qrCodeImage = qrCode.GetGraphic(20, Color.Black, Color.White,
(Bitmap)Bitmap.FromFile("C:\myimage.png"));
[Here is the link for logo, QrCode with Logo and without logo]
(
https://drive.google.com/drive/folders/120zZPzvk_A-64r3As_NIEpom3j5BuYli?usp=sharing
)
Cheers,
Supun
—
Reply to this email directly, view it on GitHub
<#397>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEC4VMVM52JU7MXO6D5XTKDVINBRPANCNFSM5VD25RAQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi, |
To be able to set this parameter, you have to add before your line of code : QRCodeGenerator qrGenerator = new QRCodeGenerator(); The ECCLevel can be set to 4 levels : Hope you have your solution to make it work now :) |
Hi,
|
Ok, I checked your image examples. I think the image is too big, especially too wide. In the examples you can find online, only a small square in the center is used for a logo, so try to reduce the size of the image, and it may work. |
Hi, |
Since there was no further feedback, I will close the issue. If you need further help @supun151515 , just let me know and open the issue again. As already noted by @technos12, the logo is simply too large. A QR code may only be covered by a maximum of X percent until it can no longer be read. As already mentioned, the X in X percent can be determined by the ECC (error correction) level. When working with logos, the highest possible ECC level, i.e. H, should always be selected. If, as in your case, the QR code is still not readable, the logo must be reduced in size. The |
I have added a non-transparent Bitmap as a logo. Then I am not able to scan the QRCode. I guess, because of the center logo, some of the QRCode pixels are hidden.
Bitmap qrCodeImage = qrCode.GetGraphic(20, Color.Black, Color.White, (Bitmap)Bitmap.FromFile("C:\myimage.png"));
[Here is the link for logo, QrCode with Logo and without logo]
(https://drive.google.com/drive/folders/120zZPzvk_A-64r3As_NIEpom3j5BuYli?usp=sharing)
Cheers,
Supun
The text was updated successfully, but these errors were encountered: