forked from 0x2620/pandora
small_frame_height too
This commit is contained in:
parent
7ea3d08bc6
commit
fc61bb8ef8
2 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ def render_poster(data, poster):
|
||||||
small_frame_image = small_frame_image.crop((left, 0, left + small_frame_size[0], small_frame_size[1]))
|
small_frame_image = small_frame_image.crop((left, 0, left + small_frame_size[0], small_frame_size[1]))
|
||||||
else:
|
else:
|
||||||
small_frame_image = small_frame_image.resize((small_frame_size[0], int(small_frame_size[0] / small_frame_image_ratio)), Image.ANTIALIAS)
|
small_frame_image = small_frame_image.resize((small_frame_size[0], int(small_frame_size[0] / small_frame_image_ratio)), Image.ANTIALIAS)
|
||||||
top = int((small_frame_image.size[1] - small_frame_height) / 2)
|
top = int((small_frame_image.size[1] - small_frame_size[1]) / 2)
|
||||||
small_frame_image = small_frame_image.crop((0, top, small_frame_size[0], top + small_frame_size[1]))
|
small_frame_image = small_frame_image.crop((0, top, small_frame_size[0], top + small_frame_size[1]))
|
||||||
poster_image.paste(small_frame_image, (i * small_frame_size[0], frame_size[1]))
|
poster_image.paste(small_frame_image, (i * small_frame_size[0], frame_size[1]))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -83,7 +83,7 @@ def render_poster(data, poster):
|
||||||
small_frame_image = small_frame_image.crop((left, 0, left + small_frame_size[0], small_frame_size[1]))
|
small_frame_image = small_frame_image.crop((left, 0, left + small_frame_size[0], small_frame_size[1]))
|
||||||
else:
|
else:
|
||||||
small_frame_image = small_frame_image.resize((small_frame_size[0], int(small_frame_size[0] / small_frame_image_ratio)), Image.ANTIALIAS)
|
small_frame_image = small_frame_image.resize((small_frame_size[0], int(small_frame_size[0] / small_frame_image_ratio)), Image.ANTIALIAS)
|
||||||
top = int((small_frame_image.size[1] - small_frame_height) / 2)
|
top = int((small_frame_image.size[1] - small_frame_size[1]) / 2)
|
||||||
small_frame_image = small_frame_image.crop((0, top, small_frame_size[0], top + small_frame_size[1]))
|
small_frame_image = small_frame_image.crop((0, top, small_frame_size[0], top + small_frame_size[1]))
|
||||||
poster_image.paste(small_frame_image, (i * small_frame_size[0], frame_size[1]))
|
poster_image.paste(small_frame_image, (i * small_frame_size[0], frame_size[1]))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue