How to batch resize pictures in Linux (Mint and Ubuntu based distros)
Don't forget to read the other tips:
Tip Of The Day (5) : Batch Script to resize pictures in linux (Nemo)
first install imagemagick :
sudo apt-get install imagemagick
then open in terminal the folder containing your pictures you want to resize, and then type the following :
for file in *.[picture extension]; do convert $file -resize [size you want] [new-name]-$file; done
example, for .JPG files that you want to resize in 800*600 (the file will be sized to fit in a 800*600 frame without destroying ratio)
for file in *.JPG; do convert $file -resize 800x600 resized-$file; done
Your resized pictures are now called resized-*.JPG (original pics are not overwritten) ie :
DSCF2248.JPG is now called resized-DSCF2248.JPG
Now you have forum-ready pics, for fast upload and quick sharing ;)
That's all folks !
No comments:
Post a Comment