Batch Resizing Using Command Line and ImageMagick

Resizing images to fit multiple devices is now easy to execute

If you deal with images, sooner or later you will want to automate the repeating process of saving different sizes from one source image. If you own Adobe Photoshop and do not save too many output sizes, Photoshop actions are probably quite enough for your needs. However, keeping a Photoshop action up-to-date is quite painful — change a source folder, and you’re screwed. On his own wallpapers website, Vlad Gerasimov generates more than 300 JPEG files for each wallpaper! He wants his art to reach as many devices as possible, which means he need to publish his wallpapers in as many sizes as he can support.

 

Long ago, Vlad Gerasimov used Photoshop actions to save multiple sizes from a source file, but it quickly became a nightmare to maintain. Photoshop provides a more powerful tool — scripting language (it’s not the same as “actions”, though the concept is similar). When writing a script, you use a programming language to tell Photoshop what to do (compared to actions, where Photoshop records what you do with mouse and keyboard). However, it’s not easy to learn at all, and he also wanted to completely remove Photoshop from process. The solution he founds is ImageMagick — a command-line image manipulation program, available for Windows, Mac and Linux. Unless you are a server administrator, you probably never thought of resizing images using command line. However, after switching to command line, Vlad Gerasimov never looked back at Photoshop for batch resizing.

Comments

Be the first to write a comment

You must me logged in to write a comment.