Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created July 31, 2021 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/21c36589fc6a7dfbebd5754544219999 to your computer and use it in GitHub Desktop.
Save amankharwal/21c36589fc6a7dfbebd5754544219999 to your computer and use it in GitHub Desktop.
from PIL import Image
import numpy as np
def collage_maker(image1, image2, name):
i1 = np.array(image1)
i2 = np.array(image2)
collage = np.vstack([i1, i2])
image = Image.fromarray(collage)
image.save(name)
# To Run The Above Function
collage_maker("image1.jpg", "image2.jpg", "new.jpg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment