skip2 / go-qrcode

:sparkles: QR Code encoder (Go)
http://go-qrcode.appspot.com
MIT License
2.58k stars 335 forks source link

码眼不符合1:1:3:1:1 #38

Closed yuedf closed 4 years ago

yuedf commented 4 years ago

qrcode.WriteFile("123", qrcode.Highest, 100, "qr_highest.png")

skip2 commented 4 years ago

Here's what I generated on the latest da1b6568686e89143e94f980a98bc2dbd5537f13 version:

yuedf commented 4 years ago

Here's what I generated on the latest da1b656 version:

image 左边黑边是4格,右边黑边是3格

yuedf commented 4 years ago

Here's what I generated on the latest da1b656 version:

image 第一个码眼左边黑边是4格,右边黑边是3格

skip2 commented 4 years ago

There are two image modes:

1) Fixed image size: (e.g. 100x100px). The QR code is resized to be as large as possible within the 100x100px. This means some columns/rows in the QR code have more or less pixels, like your image. qrcode.WriteFile("123", qrcode.Highest, 100, "qr_highest.png")

2) Variable image size. In this mode, images have variable size, but the QR code columns/rows are all the same width/height: qrcode.WriteFile("123", qrcode.Highest, -3, "qr.png")

You can use HTML/CSS to resize these generated images on a web page for example.

thank you! :)

skip2

yuedf commented 4 years ago

thanks