Shrink or enlarge images at the command line

Learn Photo Editing

Learn Photo Editing

Get Instant Access

GIMP can do just about anything to an image but it can be time-consuming to fire it up just to resize an image. For ultra-quick manipulation, consider Imagemagick, a command-line image manipulation program. It doesn't come installed by default and you'll need to install it via Synap-tic (search for and install imagemagick). Once installed, the convert command should be used with the addition of the -resize command option. For example, the following will shrink filename.bmp to half its original size:

$ convert -resize 50% filename.bmp filename_small.bmp

The following will enlarge filename.bmp to twice its original size (although there will be an obvious degradation in quality):

$ convert -resize 200% filename.bmp filename_larger.bmp

For more command-line image manipulation fun, see Tip 154, on page 197; Tip 214, on page 248; and Tip 268, on page 306.

1. You will, of course, know that a serif font is one with "bits hanging off the edges" of the lines that make up the letters, while sans-serf fonts don't have them. A good rule of thumb is that serif fonts are normally used for the text in newspapers, while sans-serif fonts tend to be used for headings. This book follows the same principle.

View all of a digital photo's technical information M 73

Was this article helpful?

0 0
Photoshop Secrets

Photoshop Secrets

Are You Frustrated Because Your Graphics Are Not Looking Professional? Have You Been Slaving Over Your Projects, But Find Yourself Not Getting What You Want From Your Generic Graphic Software? Well, youre about to learn some of the secrets and tips to enhance your images, photos and other projects that you are trying to create and make look professional.

Get My Free Ebook

Post a comment