Remove no longer needed Qt version check

This commit is contained in:
Kovid Goyal 2017-05-12 20:13:31 +05:30
parent c91e321f42
commit 6eb8526c3d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -151,9 +151,9 @@ def image_to_data(img, compression_quality=95, fmt='JPEG', png_compression_level
if img.hasAlphaChannel(): if img.hasAlphaChannel():
img = blend_image(img) img = blend_image(img)
# QImageWriter only gained the following options in Qt 5.5 # QImageWriter only gained the following options in Qt 5.5
if jpeg_optimized and hasattr(QImageWriter, 'setOptimizedWrite'): if jpeg_optimized:
w.setOptimizedWrite(True) w.setOptimizedWrite(True)
if jpeg_progressive and hasattr(QImageWriter, 'setProgressiveScanWrite'): if jpeg_progressive:
w.setProgressiveScanWrite(True) w.setProgressiveScanWrite(True)
w.setQuality(compression_quality) w.setQuality(compression_quality)
elif fmt == 'PNG': elif fmt == 'PNG':