Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from PIL import Image
- images = map(Image.open, ['culvularia_H1.jpg', 'culvularia_H1.jpg'])
- widths, heights = zip(*(i.size for i in images))
- total_width = sum(widths)
- max_height = max(heights)
- new_im = Image.new('RGB', (total_width, max_height))
- x_offset = 0
- for im in images:
- new_im.paste(im, (x_offset,0))
- x_offset += im.size[0]
- new_im.save('culvularia_H1.jpg')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement