The `identify` program describes the format and characteristics of one or more image files. It also reports if an image is incomplete or corrupt. The information returned includes the image number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image. Many more attributes are available with the verbose option. See Command Line Processing for advice on how to structure your `identify` command or see below for example usages of the command.

## Example Usage

We list a few examples of the `identify` command here to illustrate its usefulness and ease of use. To get started, lets identify an image in the JPEG format:

      identify rose.jpg
      rose.jpg JPEG 640x480 DirectClass 87kb 0.050u 0:01

Next, we look at the same image in greater detail:

      identify -verbose rose.jpg
      Image: rose.jpg
        Format: JPEG (Joint Photographic Experts Group JFIF format)
        Class: DirectClass
        Geometry: 70x46+0+0
        Type: TrueColor
        Endianess: Undefined
        Colorspace: RGB
        Depth: 8-bit
        Channel depth:
          Red: 8-bit
          Green: 8-bit
          Blue: 8-bit
        Channel statistics:
          Red:
            Min: 30 (0.117647)
            Max: 255 (1)
            Mean: 145.389 (0.570155)
            Standard deviation: 67.3859 (0.264259)
          Green:
            Min: 29 (0.113725)
            Max: 255 (1)
            Mean: 89.1997 (0.349803)
            Standard deviation: 51.9245 (0.203626)
          Blue:
            Min: 15 (0.0588235)
            Max: 255 (1)
            Mean: 80.3752 (0.315197)
            Standard deviation: 53.351 (0.209219)
        Rendering intent: Undefined
        Resolution: 72x72
        Units: PixelsPerInch
        Filesize: 1.54297kb
        Interlace: None
        Background color: white
        Border color: rgb(223,223,223)
        Matte color: grey74
        Transparent color: black
        Page geometry: 70x46+0+0
        Dispose: Undefined
        Iterations: 0
        Compression: JPEG
        Quality: 85
        Orientation: Undefined
        Jpeg:colorspace: 2
        Jpeg:sampling-factor: 2x2,1x1,1x1
        Signature: 9273d04d56681f833fbf1a08cab0702723ff2ba31b78813fcd4e67e082f5fad6
        Tainted: False
        Version: ImageMagick 6.3.6 10/01/07 Q16 http://www.imagemagick.org

To get the print size in inches of an image at 72 DPI, use:

      identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png
      8.5 x 11 inches

The depth and dimensions of a raw image must be specified on the command line:

      identify -depth 8 -size 640x480 image.raw
      rose.rgb RGB 70x46 DirectClass 9kb 0.000u 0:01

You can find additional examples of using `identify` in Examples of ImageMagick Usage.

## Option Summary

The `identify` command recognizes these options. Click on an option to get more details about how that option works.

Option | Description
--- | ---
-alpha | activate, deactivate, reset, or set the alpha channel
-antialias | remove pixel-aliasing
-authenticate value | decrypt image with this password
-channel type | apply option to select image channels
-colorspace type | set image colorspace
-crop geometry | crop the image
-debug events | display copious debugging information
-define format:option | define one or more image format options
-density geometry | horizontal and vertical density of the image
-depth value | image depth
-extract geometry | extract area from image
-format string | output formatted image characteristics
-gamma value | level of gamma correction
-help | print program options
-interlace type | type of image interlacing scheme
-interpolate method | pixel color interpolation method
-limit type value | pixel cache resource limit
-list type | Color, Configure, Delegate, Format, Magic, Module, Resource, or Type
-log format | format of debugging information
-monitor | monitor progress
-quiet | suppress all warning messages
-regard-warnings | pay attention to warning messages.
-sampling-factor geometry | horizontal and vertical sampling factor
-set attribute value | set an image attribute
-size geometry | width and height of image
-strip | strip image of all profiles and comments
-units type | the units of image resolution
-verbose | print detailed information about the image
-version | print version information
-virtual-pixel method | access method for pixels outside the boundaries of the image

Discourse Server • Mailing Lists • ImageMagick Studio