mnooner256 / pyqrcode

Python 3 module to generate QR Codes
BSD 3-Clause "New" or "Revised" License
408 stars 74 forks source link

Feature: Optional Pillow/PIL #49

Open heuer opened 7 years ago

heuer commented 7 years ago

This improves the PNG renderer iff PIL/Pillow is available. Uses PyPNG as fallback

heuer commented 7 years ago

Note: Reduces the PNG rendering significately (abt. 70ms). It does not depend on PIL/Pillow but uses it iff available. Further optimazions (file size) would be possible if the image mode would be choosen more carefully...

heuer commented 7 years ago

TODO: Add tests with Pillow/PIL available vs. not available (current tests pick PIL/Pillow if available, otherwise PyPNG)

heuer commented 7 years ago

Note that test_png.test_png_as_base64_str fails with PIL/Pillow, all other tests pass.