Rabu, 01 September 2010

Shrink or enlarge images at the command line

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, con-
sider 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 com-
mand 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

0 Comment:

Posting Komentar