From 72cf895392983274f900505d4310166fc2dbd4fc Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sun, 15 Sep 2013 19:09:57 +0200 Subject: [PATCH] Commit the other two files --- src/calibre/devices/interface.py | 5 +++++ src/calibre/gui2/device.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/interface.py b/src/calibre/devices/interface.py index 9b173b091e..920965ee6c 100644 --- a/src/calibre/devices/interface.py +++ b/src/calibre/devices/interface.py @@ -43,6 +43,11 @@ class DevicePlugin(Plugin): #: than THUMBNAIL_HEIGHT # THUMBNAIL_WIDTH = 68 + #: Compression quality for thumbnails. Set this closer to 100 to have better + #: quality thumbnails with fewer compression artifacts. Of course, the + #: thumbnails get larger as well. + THUMBNAIL_COMPRESSION_QUALITY=70 + #: Set this to True if the device supports updating cover thumbnails during #: sync_booklists. Setting it to true will ask device.py to refresh the #: cover thumbnails during book matching diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 77517b94f9..d97d44381e 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -1233,7 +1233,8 @@ class DeviceMixin(object): # {{{ ht = self.device_manager.device.THUMBNAIL_HEIGHT \ if self.device_manager else DevicePlugin.THUMBNAIL_HEIGHT try: - return thumbnail(data, ht, ht) + return thumbnail(data, ht, ht, + compression_quality=self.device_manager.device.THUMBNAIL_COMPRESSION_QUALITY) except: pass