-
-
Save antiface/538493f49f2d65244106 to your computer and use it in GitHub Desktop.
Combines multiple images of the same size into a composite image.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Combine multiple images of the same size vertically. Usage: | |
python image_stacker.py path/to/img_1.jpg path/to/img_2.jpg ... img_n.jpg | |
""" | |
import sys | |
from PIL import Image | |
size = (1920, 1080 * len(sys.argv[1:])) | |
output = Image.new('RGB', size) | |
for i, image in enumerate(sys.argv[1:]): | |
output.paste(Image.open(image), (0, i * 1080)) | |
output.save("output.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment