Using ImageMagick’s convert to resize all jpg’s in a directory

Written by James McDonald

October 25, 2007

Using cygwin with ImageMagick installed you can resize entire directories of jpegs using the convert utility

for i in `ls *.jpg`; do convert -resize 30% -quality 80 $i conv_$i; done

The 30% made images with a resolution of 3072 x 2304 pixels (approx 1.6 to 2.1MB each) into 922 x 691 (approx 80KB to 140KB each)

Experiment with different percentages to get your desired size.


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Ubuntu on Hyper-v

It boils town to installing linux-azure # as root or sudo apt-get update apt-get install linux-azure...