forked from 0x2620/pandora
fix frame_height in poster scripts
This commit is contained in:
parent
23c48d8290
commit
7ea3d08bc6
2 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ def render_poster(data, poster):
|
||||||
frame_image = frame_image.crop((left, 0, left + frame_size[0], frame_size[1]))
|
frame_image = frame_image.crop((left, 0, left + frame_size[0], frame_size[1]))
|
||||||
else:
|
else:
|
||||||
frame_image = frame_image.resize((frame_size[0], int(frame_size[0] / frame_image_ratio)), Image.ANTIALIAS)
|
frame_image = frame_image.resize((frame_size[0], int(frame_size[0] / frame_image_ratio)), Image.ANTIALIAS)
|
||||||
top = int((frame_image.size[1] - frame_height) / 2)
|
top = int((frame_image.size[1] - frame_size[1]) / 2)
|
||||||
frame_image = frame_image.crop((0, top, frame_size[0], top + frame_size[1]))
|
frame_image = frame_image.crop((0, top, frame_size[0], top + frame_size[1]))
|
||||||
poster_image.paste(frame_image, (0, 0))
|
poster_image.paste(frame_image, (0, 0))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -64,7 +64,7 @@ def render_poster(data, poster):
|
||||||
frame_image = frame_image.crop((left, 0, left + frame_size[0], frame_size[1]))
|
frame_image = frame_image.crop((left, 0, left + frame_size[0], frame_size[1]))
|
||||||
else:
|
else:
|
||||||
frame_image = frame_image.resize((frame_size[0], int(frame_size[0] / frame_image_ratio)), Image.ANTIALIAS)
|
frame_image = frame_image.resize((frame_size[0], int(frame_size[0] / frame_image_ratio)), Image.ANTIALIAS)
|
||||||
top = int((frame_image.size[1] - frame_height) / 2)
|
top = int((frame_image.size[1] - frame_size[1]) / 2)
|
||||||
frame_image = frame_image.crop((0, top, frame_size[0], top + frame_size[1]))
|
frame_image = frame_image.crop((0, top, frame_size[0], top + frame_size[1]))
|
||||||
poster_image.paste(frame_image, (0, 0))
|
poster_image.paste(frame_image, (0, 0))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue