From 4881e93d2d9265b86cfa1d570d7d2e766374c820 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sat, 21 Sep 2013 19:10:27 +0200 Subject: [PATCH 1/2] Fix not actually setting the compression level --- src/calibre/devices/smart_device_app/driver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index 84cf7ed6f0..91cf27eca7 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -1381,6 +1381,8 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): cq = int(self.settings().extra_customization[self.OPT_COMPRESSION_QUALITY]) if cq < 50 or cq > 99: compression_quality_ok = False + else: + self.THUMBNAIL_COMPRESSION_QUALITY = cq except: compression_quality_ok = False if not compression_quality_ok: From fc09a577419f5469d5a83db3a062d9f8c6dbc571 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sat, 21 Sep 2013 19:33:32 +0200 Subject: [PATCH 2/2] Ensure that icons being composed are scaled to a 128x128 box. This handles both down- and up-scaling. --- src/calibre/gui2/library/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index 182fd6866d..1345ae24cd 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -111,6 +111,8 @@ class ColumnIcon(object): # {{{ d = os.path.join(config_dir, 'cc_icons', icon) if (os.path.exists(d)): bm = QPixmap(d) + bm = bm.scaled(128, 128, aspectRatioMode= Qt.KeepAspectRatio, + transformMode=Qt.SmoothTransformation) icon_bitmaps.append(bm) total_width += bm.width() if len(icon_bitmaps) > 1: