identify
Identify image file characteristics
TLDR
View documentation for the original command
SYNOPSIS
identify [options] input-file...
PARAMETERS
-format string
Specifies a custom format string for the output, allowing users to extract specific pieces of metadata (e.g., %w for width, %h for height, %f for filename).
-ping
Performs a fast identification, only reading the image dimensions and type without decoding pixel data. Useful for quick checks on large images.
-verbose
Displays copious amounts of information about the image, including various profiles, histograms, and detailed file properties.
-size geometry
Optimizes image identification based on a specified image size. Useful for large images to avoid reading the entire file.
-quiet
Suppresses all warnings and errors, providing a cleaner output, particularly useful in scripts.
-regard-warnings
Normally warnings do not exit with an error status. This option causes warnings to be treated as errors, causing identify to exit with a non-zero status.
-list type
Lists information about supported features or configurations, such as image formats (-list format), delegates, or fonts.
DESCRIPTION
The identify command, part of the ImageMagick suite, is a powerful utility for analyzing and describing the format and characteristics of image files. It can report a wide array of information including the image type, dimensions (width and height), depth, colorspace, compression, resolution, and various profiles (like EXIF, IPTC, and ICC color profiles). This command is essential for anyone working with digital images, especially in scripting or automated workflows where image metadata needs to be extracted or verified. It supports a vast number of image formats, making it a versatile tool for inspecting everything from common JPEG and PNG files to more specialized formats like TIFF or RAW images.
CAVEATS
identify is a part of the ImageMagick suite, meaning it must be installed as part of ImageMagick and is not a standalone core Linux utility.
The command's output can be very verbose, especially with the -verbose option, requiring careful parsing for use in scripts. For some complex or very large images, processing can be resource-intensive.
SCRIPTING USAGE
Due to its powerful -format option, identify is frequently used in shell scripts or other programming languages to extract specific image metadata. For example, identify -format '%wx%h' image.jpg will output 'widthxheight', which can be easily parsed by scripts.
HISTORY
identify is a core component of the ImageMagick software suite, which was first developed by John Cristy in 1987 while working at DuPont. Initially designed for processing 24-bit images on a supercomputer, ImageMagick grew into a widely-used open-source software suite for image manipulation and conversion. identify has been a fundamental utility from early versions, providing essential image introspection capabilities critical for various imaging tasks and workflows.