mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When generating cover center logo vertically
This commit is contained in:
parent
c3f472e4ab
commit
bba964e903
@ -279,6 +279,9 @@ def create_cover_page(top_lines, logo_path, width=590, height=750,
|
||||
logo.size = (lwidth, lheight)
|
||||
left = int(max(0, (width - lwidth)/2.))
|
||||
top = bottom+10
|
||||
extra = int((available[1] - lheight)/2.0)
|
||||
if extra > 0:
|
||||
top += extra
|
||||
canvas.compose(logo, left, top)
|
||||
|
||||
return canvas.export(output_format)
|
||||
|
Loading…
x
Reference in New Issue
Block a user