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.

0 Comments

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…

Network speed test host to host

On Ubuntu / Debian apt-get install iperf3 On Windows download it from https://iperf.fr/iperf-download.php#windows Make...

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...