Batch resize of photos, images, pictures in Linux

For a folder with images named example.JPG creates resized images named example.JPG. Requires ImageMagick and a Linux console :)

for image in $(ls | grep JPG);
do
convert $image -resize 1600x1200 ${image%%JPG}jpg
done

Some more ImageMagick command-line spells here.

2 thoughts on “Batch resize of photos, images, pictures in Linux

  1. Be aware of case and files named .jpeg instead of .jpg

    This is what i would use:

    grep – i (jpeg\|jpg) | xargs convert image -resize 1600×1200

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s