Skip to main content

Batch Process Images in Linux

Submitted by amitsedai on
Sometimes its a pain when you want to modify, resize multiple files at once in Linux. Fortunately ImageMagick comes with a handy command called convert that makes the work simpler Install ImageMagick in Ubuntu
sudo apt-get install imagemagick
Batch Process set of files in a folder and resize them to 1024X768
for file in *.jpg; do convert "$file" -resize 1024x768 "$file"; done
You may also try an app called as phatch for GUI related batch processing of images. Snippet to bulk rename files by replacing strings in filename Example: for file in *_0_0*; do newfile=`echo $file| sed 's/_0_0//'`; mv "$file" "$newfile"; done;
Syntax: for file in ; do newfile=`echo $file| sed 's///'`; mv "$file" "$newfile"; done;

-- Source http://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal/ http://www.muktware.com/articles/420/batch-edit-images-ubuntu