swh:1:snp:e36d3a9dc64e2fc6e09af37c5c9a335152b08822
Tip revision: 64add72c4014140c356a58972679a6467163aabd authored by Matt I.B. Oddo on 10 December 2024, 19:18:47 UTC
Update README.md
Update README.md
Tip revision: 64add72
EXPORT_2x12.py
from PIL import Image
image_width, image_height = 500, 500
collage_width, collage_height = 12 * image_width, 2 * image_height
collage = Image.new("RGB", (collage_width, collage_height))
# figure_type = "ER_p"
# figure_type = "BA_m"
# figure_type = "WS_p"
figure_type = "Loop"
for i in range(12):
filename = f"output/{figure_type}_NL{str(i+1).zfill(2)}.png"
img = Image.open(filename)
img = img.resize((image_width, image_height))
x = (i % 12) * image_width
y = 0
collage.paste(img, (x, y))
for i in range(12):
filename = f"output/{figure_type}_PS{str(i+1).zfill(2)}.png"
img = Image.open(filename)
img = img.resize((image_width, image_height))
x = (i % 12) * image_width
y = image_height
collage.paste(img, (x, y))
collage.save(f"{figure_type}.png", dpi=(600, 600))