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


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: