Skip to content
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.

Commit

Permalink
Changing thumbnail processing in synccovers. It thumb is too small - …
Browse files Browse the repository at this point in the history
…try cover instead
  • Loading branch information
rupor-github committed Oct 1, 2016
1 parent 25d12c1 commit aef2fcf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ lib/
lib64/
parts/
sdist/
test/
var/
*.egg-info/
.installed.cfg
Expand Down
4 changes: 3 additions & 1 deletion modules/mobi_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,12 @@ def __init__(self, infile):
thumb_index = 0xffffffff

if cover_index != 0xffffffff:
width, height = 0, 0
if thumb_index != 0xffffffff:
image = readsection(datain, thumb_index)
self.thumbnail = Image.open(BytesIO(image))
else:
width, height = self.thumbnail.size
if width < 330 and height < 470:
image = readsection(datain, cover_index)
self.thumbnail = Image.open(BytesIO(image))
self.thumbnail.thumbnail((330, 470), Image.ANTIALIAS)
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

WINDOWS = platform.system().lower() == "windows"

VERSION = u'3.3.1'
VERSION = u'3.3.3'

0 comments on commit aef2fcf

Please sign in to comment.