View Single Post
Old 01-02-2013, 10:53 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,265
Karma: 4961457
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Couple of things:

1) Dont use NamedTemporaryFile, use one of the functions from calibre.ptempfile instead as they handle temp file locations in a consistent manner.

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).
kovidgoyal is offline   Reply With Quote