linux poison RSS
linux poison Email

Convert image formats using ImageMagick

The ImageMagick suite of programs allows you to manipulate images from the command-line, making it much simpler to convert large numbers of pictures or even for that single quick image conversion.

The convert tool is used to convert pictures from one format or size to another. The easiest method is to simply convert an image from one format to another using:

$ convert image.jpg image.png

This will convert image.jpg from a JPEG to a PNG and save it as image.png.

To convert and resize an image, use:

$ convert -size 50x50 image.jpg image.png

This will convert from JPEG to PNG format and resize the resulting image to 50x50 pixels. Likewise, you can use convert to rotate an image:

$ convert -rotate 90 image.jpg image.png


Post a Comment

Related Posts with Thumbnails