From 08bc3fd81b3e2b7b58830bee87aee12773f6a958 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 6 May 2016 21:40:45 +0530 Subject: [PATCH] ... --- src/calibre/utils/img.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/utils/img.py b/src/calibre/utils/img.py index 9eae22dbed..1eed118e0e 100644 --- a/src/calibre/utils/img.py +++ b/src/calibre/utils/img.py @@ -102,6 +102,7 @@ def image_to_data(img, compression_quality=95, fmt='JPEG', png_compression_level if is_jpeg: if img.hasAlphaChannel(): img = blend_image(img) + # QImageWriter only gained the following options in Qt 5.5 if jpeg_optimized and hasattr(QImageWriter, 'setOptimizedWrite'): w.setOptimizedWrite(True) if jpeg_progressive and hasattr(QImageWriter, 'setProgressiveScanWrite'):