27 November 2010

Ubuntu - Batch Resize Photos

First we need imagemagick tool.
$sudo apt-get install imagemagick
Then we will resize all jpeg pictures with height over 1024 and width over 1280 from current folder, overwriting them (with 75 jpg quality):
$mogrify -quality 75 -resize '1280x1024>' *.jpg 
That's all.

EDIT: I have just found a better way! Download xnconvert. Just create a profile and use it every time. It is working perfectly with Ubuntu (10.04 - 12.04). You can also use this embedded in XNViewMP, a great multi-platform image viewer.