go-qrcode icon indicating copy to clipboard operation
go-qrcode copied to clipboard

Setting output size?

Open syntaqx opened this issue 9 months ago • 3 comments

I realize I'm able to set the QRWidth using:

standard.WithQRWidth(255)

However, how can I specify that I want a total image output of say, 1024x1024?

syntaqx avatar May 08 '24 23:05 syntaqx

If I understand you correctly,1024x1024 means the output image pixels size, however it's not able to be limited since your input content would be oversized, so we don't provide such an option yet. @syntaqx

yeqown avatar May 09 '24 03:05 yeqown

Yes, I'm referring to the output image's pixel size. I want to use your library, as I was previously using https://github.com/skip2/go-qrcode, which allowed me to simply do:

var png []byte
png, err := qrcode.Encode("https://example.org", qrcode.Medium, 1024)

Any plans to make this feature?

syntaqx avatar May 09 '24 05:05 syntaqx

it's not a complicated feature, would you make a PR?

yeqown avatar May 10 '24 11:05 yeqown