mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 21:53:29 +02:00
Add a comment to generated cover's metadata so they can be easily identified
This commit is contained in:
parent
681bec7ee0
commit
e145787888
1 changed files with 2 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
)
|
||||
|
||||
from calibre import force_unicode
|
||||
from calibre.constants import __appname__, __version__
|
||||
from calibre.ebooks.metadata import fmt_sidx
|
||||
from calibre.ebooks.metadata.book.formatter import SafeFormat
|
||||
from calibre.gui2 import ensure_app, config, load_builtin_fonts, pixmap_to_data
|
||||
|
|
@ -455,6 +456,7 @@ def generate_cover(mi, prefs=None, as_qimage=False):
|
|||
p.setPen(color)
|
||||
block.draw(p)
|
||||
p.end()
|
||||
img.setText('Generated cover', '%s %s' % (__appname__, __version__))
|
||||
if as_qimage:
|
||||
return img
|
||||
return pixmap_to_data(img)
|
||||
|
|
|
|||
Loading…
Reference in a new issue