View Single Post
Old 01-03-2013, 07:50 AM   #5
Junior Member
tdido began at the beginning.
Posts: 8
Karma: 12
Join Date: Jun 2009
Device: Sony PRS-T1
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.

Originally Posted by kovidgoyal View Post
2) Dont use PIL, use the save_cover_data_to function from calibre/utils/magick/ 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.

tdido is offline   Reply With Quote