Friday, July 4, 2014

How to resize pictures in Ubuntu

In Ubuntu, this is how I resize my image files

First, I installed imagemagick
~# sudo apt-get install imagemagick

To resize file individually
~# convert [imagefilename] -resize 1366 [newimagefilename]
  • The [newimagefilename] can be the same as the original filename if the original file is not intend not to be preserved.
  • 1366 will be the new size, change this with desired figure.
To deal with multiple files, I use loop like this: 

~# for file in *.JPG; do convert $file -resize 1366 $file; done

No comments:

Post a Comment