lincolnloop / python-qrcode

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

Optimization for solid B&W color mask #234

Closed wolfgang42 closed 3 years ago

wolfgang42 commented 3 years ago

If the QR code is being drawn in the default black-and-white mode, we can save a lot of CPU (especially for high-res images) by skipping the color masking process entirely, since it's a no-op in this case anyway.