Ubuntu: How can I resize all images in a folder to the same width?

HomeOther ContentUbuntu: How can I resize all images in a folder to the same width?
Ubuntu: How can I resize all images in a folder to the same width?
Ubuntu: How can I resize all images in a folder to the same width?
Ubuntu: How can I resize all images in a folder to the same width?

The question: I want to resize all images in a given folder to the same width (but different
suitable heights). How can I do this using a GUI or command?
line tool?
For bonus points, is it possible to limit which images are scaled based on
their initial width (i.e. only scaled images that have width x and/or
width y) ?

Example solutions (please watch the entire video to see all solutions, in order of how many people found them useful):

This solution helped 25 people
Try that:
sudo apt-get install gimp-plugin-registry
Next, open Gimp and open the Batch plugin found in Filters Batch Batch
Process.
Select your images in the Input tab and set the Resize operation in the Input tab.
Surprisingly named Resize tab.
More information can be found http://ulyssesonline.com/2008/09/22/batch-resize-
images-with-gimp/.

This solution helped 142 people
It's very simple to do with http://www.imagemagick.org/. You should be able to
install it in Software Center. I would suggest it for batch processing of
pictures.
Batch resizing is incredibly simple (I tested it with Ubuntu 11.10). To use
the following command to resize each .jpg file to a width of 200 pixels, maintaining the
aspect ratio:
convert '*.jpg[200x]' resized%03d.png
you can keep the filename using the -set option. Ex:
convert /"images/*.jpg[250x]/" -set filename:base /"%[base]/" /?images/new_folder/%
[filename:base].jpg/"
If you have more files you should use them with find
find /folder -iname '*.JPG' -exec convert {} -verbose -set filename:base /"%
[base]/" -resize 1920×1080 /"/folder/images/%[filename:base].JPG/" ;
This only scratches the surface of the power of imagemagick. Resize http:
//www.imagemagick.org/Usage/resize/#resize. For more advanced resizing, you have
to use the -resize option.
You can limit resizing to shrinking:
convert '*.jpg[300x]' thumb-300-%03d.png
or by enlarging:
convert '*.jpg[300x]' thumb-300-%03d.png
Take a look at http://www.imagemagick.org/script/command-line-
Processing.php#geometry to see more options.

This solution helped 8 people
Answered and accepted (and I use ImageMagick) but for completeness… I have a
non-technical boss who wanted a simple visualizer with a few basic tools and he had
be a graphical interface. I chose https://wiki.gnome.org/Apps/gthumb for it.
In the thumbnail view you…
* Select the images you want to resize
* Start the resizing function (click the Resize Images Wrench icon..)
* Enter a new size based on pixels or percentage
* Select an output folder and go.

This solution helped 31 people
For the GUI, https://launchpad.net/phatch /"one click is worth a thousand photos/" is
the best for such quick work. It's already in the Ubuntu repository.
sudo apt-get install phatch
1. Add a Scale element and Save
2. Set scale/resize options
3. Set save/exit options
4. Run
5. Set input folder
6. Click batch to run

This solution helped 3 people
For batch image resizing, I looked at many packages and finally found one.
with a usable interface – Conversen. Once you discover that the important
the settings are somewhat hidden in the drop-down left pane, everything is fine.
I don't know if this addresses all of the OP's use cases, but you might not have to search
to the original imagemagick or phatch user interfaces.
Oddly, photo management software like digikam, f-spot, fotoxx or shotwell does not do this.
seem to recognize the need to copy/resize batches of images before
upload to online services like photobucket or (gag) flickr. These services
want us to do things their way, so I don't trust them with backups
originals.
With thanks and praise to God! Thank you to the many people who made this project possible! Content (except music and images) licensed under cc by-sa 3.0 Music: https://www.bensound.com/royalty-free-music Images: https://stocksnap.io/license and others With thanks to the user . dz (https://askubuntu.com/users/26246), user SirCharlo (https://askubuntu.com/users/40421), user Mike (https://askubuntu.com/users/411820), user miguelfg ( https://askubuntu.com/users/475915), user kenorb (https://askubuntu.com/users/78223), user Hari KT (https://askubuntu.com/users/17968), user Gunith D ( https://askubuntu.com/users/382301), user Dennis (https://askubuntu.com/users/49), user d3vid (https://askubuntu.com/users/7146), user Braiam (https: //askubuntu.com/users/169736), user bandi (https://askubuntu.com/users/3382) and Stack Exchange Network (http://askubuntu.com/questions/135477). Trademarks are the property of their respective owners. Disclaimer: All information is provided /"AS IS/" without warranty of any kind. You are responsible for your own actions. Please contact me if something is wrong at Roel D.OT VandePaar AT gmail.com.

Please take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *