Monday, December 7, 2009

Batch resize and convert images using ImageMagick

Enter the following command to resize all JPEG images in a directory to 750×500 pixels. Obviously, you can change the 750×500 to whatever dimensions you prefer:
convert -resize 750×500 *.jpg
Enter the following command to convert a JPEG into a GIF. You can convert any format image, it doesn’t have to just be JPEG to GIF:
convert image.jpg newImage.gif
Enter the following command to reduce the quality of every JPEG in a directory down to 80%. You can change the 80% to whatever percentage you prefer:
convert -quality 80% *.jpg
Please visit the ImageMagick homepage to learn about the thousands of other commands available.
Note: You can also combine commands. For example:
convert -resize 750×500 -quality 80% *.jpg

No comments:

Post a Comment