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

SVG optimization from <rect> to <path>? #11

Open
imcotton opened this issue Oct 2, 2024 · 2 comments
Open

SVG optimization from <rect> to <path>? #11

imcotton opened this issue Oct 2, 2024 · 2 comments

Comments

@imcotton
Copy link

imcotton commented Oct 2, 2024

The current SVG implementation generates multiple <rect> elements to render the bit blocks. I think it could be optimized by using a single <path d="..."> within the <svg> element.

This way could significantly reduce file size and improve efficiency, it may be worthwhile to look into.

@paulmillr
Copy link
Owner

Pull reqs are welcome!

@imcotton
Copy link
Author

imcotton commented Oct 2, 2024

Disclaimer: I only bumped other libraries with this compact SVG rendering approach for QR codes. I'm not an expert on this very topic, so maybe someone with more experience or knowledge would take this on. Thanks!

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

3 participants
@imcotton @paulmillr and others