I also added a bit better contrast (if the title page of the pdf only contains text, the cover icon is hard to read), so the cover code now looks like this:
Code:
#-------- Create thumbnail --------
def make_cover(cover, out):
"""Takes a PIL image and returns the image transformed
to be used as a thumbnail on the Iliad"""
if cover:
try:
coversize = (69, 93)
out = os.path.join(out, "cover.png")
cover = ImageOps.grayscale(cover)
cover.thumbnail(coversize, Image.ANTIALIAS)
cover = ImageOps.autocontrast(cover,0)
cover.save(out)
return True
except: return False
else:
return False
Again, many thanks for your great tool - it is really useful!!!