Created
October 23, 2012 20:20
-
-
Save iambibhas/3941283 to your computer and use it in GitHub Desktop.
Batch resizing JPEG images with ImageMagick
This file contains hidden or 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
#!/bin/bash | |
if [ ! -d ./resized ]; then mkdir ./resized; fi; | |
# creates the screen image | |
for f in *.JPG; | |
do | |
echo "Processing $f" | |
convert -strip -modulate 105,110,100 -resize "1024x768" -unsharp 0,1.5,0.05 \ | |
$f ./resized/$f | |
done | |
cd ./resized | |
# change the image names | |
for i in *.JPG; | |
do | |
mv "$i" "${i/.JPG}"_s.JPG; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment