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
import sys | |
from PIL import Image | |
list_im = ['brassrod.jpg', 'primer.jpg'] | |
images = map(Image.open, list_im) | |
widths, heights = zip(*(i.size for i in images)) | |
max_height = max(heights) | |
for i, im in enumerate(images): |
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
# revalo | |
# Usage | |
# python compress.py input.jpg 6000 3000 <compression_level, example=40> output.jpg | |
import PIL | |
from PIL import Image | |
import sys | |
args = sys.argv[1:] |