identify
Identify image file characteristics
TLDR
View documentation for the original command
SYNOPSIS
identify [options...] [files...]
PARAMETERS
-authenticate password
Decrypts password-protected images
-channel type
Applies operation to specific channels (e.g., RGB)
-colorspace type
Sets colorspace (e.g., sRGB, CMYK)
-debug events
Enables debug output for events
-define format:option
Sets format-specific options
-density geometry
Viewing density (DPI)
-depth value
Image depth (8/16-bit)
-extract geometry
Extracts region from image
-format string
Custom output format (e.g., %wx%h)
-interlace type
Interlace scheme (e.g., Line, Plane)
-limit type value
Limits resources (e.g., memory, map)
-list type
Lists capabilities (e.g., format, type)
-ping
Quick analysis without decoding pixels
-quiet
Suppresses warnings
-regard-warnings
Treats warnings as errors
-set attribute value
Sets image attribute
-size geometry
Expected image size for decoding
-strip
Removes profiles and comments
-verbose
Detailed output including histograms
-version
Prints ImageMagick version
DESCRIPTION
The identify command from the ImageMagick suite analyzes image files, reporting their format, dimensions, color depth, and other attributes. It supports hundreds of image formats including JPEG, PNG, GIF, TIFF, and more exotic ones like ICO or WebP.
Basic usage prints a one-line summary per file, e.g., rose.jpg JPEG 640x480 8-bit sRGB 464KB. Options enable customized output, such as JSON via -format, or detailed verbose info with histograms, color profiles, and EXIF data.
Useful in scripts for batch validation, resizing decisions, or format conversion workflows. It quickly 'pings' images without full decoding for efficiency. Processes multiple files or directories recursively with -recurse, making it a staple for image processing pipelines.
Relies on ImageMagick's delegate libraries for format support; accuracy depends on installation.
CAVEATS
Requires ImageMagick installation; some formats need delegates (e.g., libjpeg). Verbose output can be voluminous. Not suitable for non-image files. Multi-threaded processing may vary by build.
COMMON EXAMPLE
identify image.jpg
Outputs: image.jpg JPEG 1920x1080 8-bit sRGB 1.2MB
identify -format '%m %wx%h %b' *.jpg
Batch format, size, bytes.
FORMAT SPECIFIERS
Use %f filename, %m format, %wx%h dimensions, %b size, %c class in -format string for scripting.
HISTORY
Part of ImageMagick, developed by John Cristy starting 1990. identify debuted in early versions for basic image inspection, evolving with format support expansions through ImageMagick 6/7 releases. Widely used since 2000s in Linux distros.


