mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a comment to generated cover's metadata so they can be easily identified
This commit is contained in:
parent
681bec7ee0
commit
e145787888
@ -20,6 +20,7 @@ from PyQt5.Qt import (
|
||||
)
|
||||
|
||||
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…
x
Reference in New Issue
Block a user