Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to scale all images in a given folder to the same width (but different appropriately scaled heights). How can I do this using a GUI-based or command-line tool?

For bonus points, is it possible to restrict which images are scaled based on their initial width (that is, only scale images that have a width > x and/or a width < y)?

share|improve this question

4 Answers 4

up vote 44 down vote accepted

This is very easy to do with imagemagick. You should be able to install it in the Software Center. I would suggest it for batch processing of images.

The batch resizing is incredibly simple (I tested it with Ubuntu 11.10). Use the following command to resize every .jpg file to 200 pixel width, keeping the aspect ratio:

$ convert '*.jpg[200x]' resized%03d.png

This is only scratching the surface of the power of imagemagick. Resizing can be tuned endlessly. For more advanced resizing you have to use the -resize option.

You can limit the resizing to shrinking:

$ convert '*.jpg[300x>]' thumb-300-%03d.png

or enlarging:

$ convert '*.jpg[300x<]' thumb-300-%03d.png

Have look at the geometry documentation to see more options.

share|improve this answer

Try this:

sudo apt-get install gimp-plugin-registry

Then, open up Gimp and open the Batch plugin found in Filters > Batch > Batch Process.

Select your images in the Input tab, and define the Resize operation in the surprisingly-named Resize tab.

More information can be found here.

share|improve this answer

For GUI, Phatch "one click is worth thousand photos" is the best for such quick job. It is already in Ubuntu repository.

sudo apt-get install phatch
  1. Add Scale & Save item
  2. Set scale/resize options
  3. Set save/output options
  4. Run
  5. Set input folder
  6. Click batch to execute

enter image description here enter image description here

share|improve this answer
For an upvote, an example how to actually accomplish the task in the question would be nice :) But thanks for the tip, nice tool! –  jaywink Jul 28 '14 at 7:12
great tool for quick actions, thanks –  Angel M. Jan 3 at 8:48

Answered and accepted (and I use ImageMagick) but for completeness... I have a non-technical boss that wanted a simple viewer with some basic tools and it had to be GUI. I decided on gThumb for him. In the thumbnail view you...

Select any images you want resized
Start the resize function
Put in a new size based on pixels or percentage
Select an output folder, and off you go.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.