HOWTO batch/mass image resize
September 22, 2007
so you’ve got 800 .JPGs in one folder, and you need to resize all of them. you would definitely not want to open every each one in GIMP and resize it one by one. here’s a script that would make this task easier:
but first you need imagemagick to get this to work, so:
sudo apt-get install imagemagick
and here’s the script:
for i in `ls *.jpg`;
convert $i -resize 800×600 $i
save this in a file in the same folder as your target images, then, make sure it is executable in Properties > Permissions, then run it in the terminal using ./filename
it will take some time to resize a hundred images, be patient.
note: the file extension is case sensitive, almost everything in linux is case-sensitive, well it actually should be.