View Single Post
Old 01-03-2013, 08:50 AM   #5
tdido
Junior Member
tdido began at the beginning.
 
Posts: 8
Karma: 12
Join Date: Jun 2009
Device: Sony PRS-T1
Quote:
Originally Posted by kovidgoyal View Post
1) Dont use NamedTemporaryFile, use one of the functions from calibre.ptempfile instead as they handle temp file locations in a consistent manner.
Great, I'll change that. Thanks for the tip.

Quote:
Originally Posted by kovidgoyal View Post
2) Dont use PIL, use the save_cover_data_to function from calibre/utils/magick/draw.py it is more robust (PIL is unmaintained, that function uses ImageMagick).
Will do. One question though: what would be the best way to handle the cropping? The cover file, as available in the website, also contains the back cover, which should be removed.

Thanks!
tdido is offline   Reply With Quote