Resize multiple image files using command-line tools

This article may be useful to webmasters. It covers Linux commands for resizing JPEG, TIFF, PNM, GIF, and other Photo CD image formats. The procedure is straightforward. First install the ImageMagick package, which provides the image resizing program, using:
#yum install ImageMagick
After installation, the program is ready to use.
Here are some examples:
Example 1: Resize .JPG files to a width of 640 pixels while retaining the other resolution settings. Use:
#mogrify -resize 640 *.jpg
Example 2: Resize .JPG files to a width of 640 pixels and a height of 480 pixels. Use:
#mogrify -resize 640x480! *.jpg