Category: Linux and Open Source

In an earlier article, I mentioned conversion of graphics file formats at the command line. However, you can also resize graphics, too - this is a particularly useful trick when you want to create thumbnails or smaller versions of high-res images for use in web pages or emails.

The trick is to master the Image Magick convert command, and to know the aspect ratio of the images to be converted. For example, if your camera produces images at 1600 x 1200 resolution, you might find that quartering the size in each dimension gives you pictures that are ideal for web page use, but only one-sixteenth the file size (hence 16 x faster loading!). To convert a picture of your new case mod down to sixteenth-size, then, use this command:

convert -size 400x300 office.jpg -resize 400x300 +profile '*' office-400.jpg

The convert command can do a lot of other things, too, such as making background colours transparent, sharpening  or blurring images, or even applying an oil-painting effect.

Another nice thing - ImageMagick can be installed on Windows, too!