yeqown / go-qrcode

To help gophers generate QR Codes with customized styles, such as color, block size, block shape, and icon.
MIT License
567 stars 87 forks source link

Why is jpeg is used by default? #68

Closed stokito closed 2 years ago

stokito commented 2 years ago

The jpg format is a loosing compression and was developed for photos. But for qr codes the ideal format is PNG and resulting files are about 10 times smaller. Could you please switch the defaults to PNG?

Because now I started working a big project that generates thousands of QR codes daily. Each of them about 23-25kb and uploaded to S3 buckets. This is just gigantic waste of money and bandwidth. I'll change all this but wondered how this might happen in first place. And now I see that even in the sample in README the output format is JPEG.

Also please add an example of resizing the resulted image. Because I see in code that my colleges just resizing the generated QR code. But I guess the minimal qr must be generated by default wit only a pixel for a dot. And latter if it can be resized by a browser or app itself on view

yeqown commented 2 years ago

69 related, we call to discuss in that issue, so this closed.

stokito commented 2 years ago

the issue is more about changing documentation

stokito commented 2 years ago

It would be even cooler to change default to PNG. But this may break existing dependents. At least README must be updated for sure. I've spent some time to figure out how to use PNG instead of JPEG