Fix Cybook cover size being a postage stamp withing the thumbnail generated.

This commit is contained in:
John Schember 2009-02-21 13:41:22 -05:00
parent 21619e1b4f
commit 480a3cd3bb
2 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,8 @@ class CYBOOKG3(USBMS):
EBOOK_DIR_CARD = "eBooks"
SUPPORTS_SUB_DIRS = True
THUMBNAIL_HEIGHT = 144
def upload_books(self, files, names, on_card=False, end_session=True,
metadata=None):
if on_card and not self._card_prefix:

View File

@ -30,7 +30,7 @@ def write_t2b(t2bfile, coverdata=None):
if coverdata != None:
coverdata = StringIO.StringIO(coverdata)
cover = Image.open(coverdata).convert("L")
cover.thumbnail((96, 144))
cover.thumbnail((96, 144), Image.ANTIALIAS)
t2bcover = Image.new('L', (96, 144), 'white')
x, y = cover.size