« Civilization IV on Ubuntu | Main | Explosions on the Moon »

Simple image resizing in Ubuntu

I quite often process my images before I stick them online and so don't often need to bulk resize them, but occasionally it is quite useful. When I had both Ubuntu and windows installed I just revert to using IrfanView, a great little program. I do actually have it install through wine but being me I wanted a better solution. Then it dawned on me, why don't I just use ImageMagick - I do this on a couple of websites. The first thing you need to do is get the package:

sudo apt-get install imagemagick

After ImageMagick installation, you can use mogrify.

Make sure you are in the correct directory and then just use:

mogrify -resize 640 *.jpg

which will rename all the files (assuming they have the extension .jpg) to a width of 640 NOTE THIS WILL OVERWRITE YOUR FILES, so it worth copying them to another directory first so you don't lose your high res images, but if you can use the commandline then you probably can figure this out!

Oh you can also fix the size but this will of course lose the aspect ratio...

mogrify -resize 640×480! *.jpg

TrackBack

TrackBack URL for this entry:
http://www.krioma.net/cgi-bin/mt_new/mt-tb.cgi/303

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on May 20, 2008 10:27 AM.

The previous post in this blog was Civilization IV on Ubuntu.

The next post in this blog is Explosions on the Moon.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.33