LinuxCommandLibrary

ImageMagick

Convert, edit, compose, or display images

SYNOPSIS

convert [options] input_file [options] output_file

PARAMETERS

-resize geometry
    Resizes the image to the specified geometry (e.g., 50%, 640x480).

-rotate degrees
    Rotates the image by the specified number of degrees.

-crop geometry
    Crops the image to the specified geometry (e.g., 100x100+50+50).

-quality value
    Sets the image quality (0-100, higher values mean better quality but larger file size).

-format format
    Specifies the output image format (e.g., png, jpg, gif).

input_file
    The path to the input image file.

output_file
    The path to the output image file.

DESCRIPTION

ImageMagick is a powerful command-line tool used for displaying, converting, and editing raster image files.
It supports a wide variety of image formats, including common formats like JPEG, PNG, GIF, TIFF, and many others.
ImageMagick can perform various image manipulations such as resizing, rotating, cropping, color adjustments, applying filters, and drawing shapes.
It's highly scriptable and integrates well with scripting languages like Bash, Python, and Perl, making it a versatile tool for batch processing and automated image manipulation tasks.
It's not interactive and relies on command-line options to specify the desired operations.
ImageMagick is commonly used for web development, graphic design, and scientific imaging.

CAVEATS

ImageMagick can be vulnerable to security exploits if not used carefully, especially when processing user-supplied images.
It's essential to keep ImageMagick updated to the latest version and to sanitize input data to prevent malicious code execution.

COLOR MANAGEMENT

ImageMagick provides robust support for color management, allowing you to convert images between different color spaces (e.g., sRGB, CMYK) and apply color profiles. This is important for ensuring accurate color representation across different devices.

DRAWING AND ANNOTATING

ImageMagick allows you to draw shapes, text, and other graphical elements on images. This can be used for adding watermarks, annotations, or creating custom image overlays.

HISTORY

ImageMagick was initially created by John Cristy at DuPont in 1987.
Over the years, it has been continuously developed and improved by a dedicated community of developers.
Its widespread adoption in web development and image processing workflows has made it a crucial tool for many developers and graphic designers.
Due to some vulnerabilities the source code was rewritten.

SEE ALSO

identify(1), mogrify(1)

Copied to clipboard