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

Feature Request: Remove modules under image in SVG output #64

Open
TheAwiteb opened this issue Aug 6, 2024 · 4 comments
Open

Feature Request: Remove modules under image in SVG output #64

TheAwiteb opened this issue Aug 6, 2024 · 4 comments

Comments

@TheAwiteb
Copy link
Contributor

Currently, the SVG output includes modules beneath the image. By removing these, the QR code will have a more polished and professional look.

@erwanvivien
Copy link
Owner

The reason I kept the modules behind the image was that since the image can be remote (not base64) it could take time to load, having modules behind makes the QRCode valid and not weird in the transition.

You tried with transparent images, is that the problem?

@TheAwiteb
Copy link
Contributor Author

having modules behind makes the QRCode valid and not weird in the transition.

Maybe we can make it an option? Because if I'm using a base64 image, I'd prefer to remove the background modules. However, if the image is a remote image, I would be afraid that the image might have been deleted or changed, and the QR code would look unacceptable. So it depends on how you bring the image, so I think it's good that it's an option and not there by default.

You tried with transparent images, is that the problem?

Yes, as you can see below the Rust logo is hard to see

Also with Forgejo logo, I think it's will be better if we remove the background modules

With background modules Without background modules With White Background

White background

A white background works well if your QR code background is white. If it's not (which is uncommon), you can change it to match your background color. However, if you're not using square modules, the white background is not ideal because parts of the modules will be visible behind the background, as you can see below

@TheAwiteb
Copy link
Contributor Author

When I zoom in on the white square background, I can see some of the modules that lie behind the background, as you can see below.

@erwanvivien
Copy link
Owner

Yep I understand the issue, It's an alignment problem of the underlying renderers (Chrome for example)

That said it's ugly and can be fixed.
I'll have to think of a better way to do Shape::Command and include color in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants