14 lines
587 B
Python
14 lines
587 B
Python
#!/usr/bin/env python3
|
|
"""pv.py OUT SHEET [SHEET ...]: the 32 previews of sheets (e.g. imp-walk) at half size, side by side."""
|
|
import os, sys
|
|
from PIL import Image
|
|
D = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "anim")
|
|
ims = [Image.open(os.path.join(D, f"{s}-32-preview.png")) for s in sys.argv[2:]]
|
|
ims = [i.resize((i.width // 2, i.height // 2), Image.NEAREST) for i in ims]
|
|
out = Image.new("RGB", (sum(i.width for i in ims) + 8 * (len(ims) - 1), ims[0].height), (20, 20, 20))
|
|
x = 0
|
|
for i in ims:
|
|
out.paste(i, (x, 0))
|
|
x += i.width + 8
|
|
out.save(sys.argv[1])
|