lincolnloop / python-qrcode

Python QR Code image generator
https://pypi.python.org/pypi/qrcode
Other
4.34k stars 664 forks source link

"width" is overlapped. #254

Closed jimaobian closed 2 years ago

jimaobian commented 2 years ago

Check the following code here:

Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import qrcode
>>> img = qrcode.make("new")
>>> img.width
21
>>> img.height
290
>>> img.size
(290, 290)
>>> 
SmileyChris commented 2 years ago

Width is the number of qr "pixels", size is the actual image dimensions

SmileyChris commented 2 years ago

Yes, it's overriding the image, but changing it would be a backwards incompatible change with only a small benefit.