| name | image-editing |
| description | Comprehensive command-line tools for modifying and manipulating images, such as resize, blur, crop, flip, and many more. |
| license | Proprietary. LICENSE.txt has complete terms |
Command-line Tools: Convert
Overview
This guide covers essential image processing operations using ImageMagick, a collection of command-line tools that can be applied to modify and manipulate images. With this toolkit, you can edit images in batch on Linux command-line.
Image Operations
Use the convert command to resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
Example Usage
We list a few examples of the command here to illustrate its usefulness and ease of use. To get started, let's reduce the size of our rose:
convert -resize 50% rose.jpg
You can resize all your JPEG images in a folder to a maximum dimension of 256x256 with this command:
convert -resize 256x256 *.jpg
Finally, we convert all our PNG images in a folder to the JPEG format:
convert -format jpg *.png
Here image files 1.png, 2.png, etc., are left untouched and files 1.jpg, 2.jpg, etc., are created. They are copies of their respective PNG images except are stored in the JPEG image format.
Useful image operations and their corresponding command:
-auto-orient
Adjusts an image so that its orientation is suitable for viewing (i.e. top-left orientation). This operator reads and resets the EXIF image profile setting 'Orientation' and then performs the appropriate 90 degree rotation on the image to orient the image, for correct viewing.
Set the background color. The color is specified using the format described under the -fill option. The default background color (if none is specified or found in the image) is white.