qr icon indicating copy to clipboard operation
qr copied to clipboard

SVG optimization from <rect> to <path>?

Open imcotton opened this issue 1 year ago • 2 comments

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.

imcotton avatar Oct 02 '24 02:10 imcotton

Pull reqs are welcome!

paulmillr avatar Oct 02 '24 03:10 paulmillr

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!

imcotton avatar Oct 02 '24 11:10 imcotton

Thanks @micah-yeager 👍

imcotton avatar Apr 08 '25 23:04 imcotton