Simple image resize and optimization tool. Resizes and optimizes images.
Python > 3, Pillow
Run it. Uses the current working directory as source. A
output directory is created for resized images. Resized images are JPEGs.
chmod +x script.py, then register it as an alias and run it from anywhere with a simple command.
--size, -s: Takes a value in the form of
[width]x[height] and resizes the images accordingly. If height is ommited, it scales images. Aspect ratio is always kept. Default: 1280x960
--inputname, -i: If provided, resize specified image. Otherwise it looks for images in the current working directory.
--quality, -q: Image optimization quality. Default: 85
--outname, -o: Name for resized images. If multiple images are created, they are numbered, 0-indexed. Default: "image"