Batch convert images with ImageMagick

I’m posting this just because I’m sick of having to re-figure out the command line whenever I have to do it!

The idea is to process each file in the current path in the form of *.jpg, then resize it to a max of 96×96 (so when complete, the final image will not have a max dimension over 96, but it will scale so one dimension will likely be less), then write the new image into a pre-created folder from the current path named ‘converted’.

for I in *.jpg; do convert $I -resize 96x96 converted/$I; done

Comments are closed.