[
About ImageMagick
] [ Command-line Tools Processing Options Usage Program Interfaces MagickWand MagickCore PerlMagick Magick++ Architecture ] [ Install from Source Unix Windows Binary Releases Unix Mac OS X Windows Resources ] [ Download ] [ Site Map Links ] [ Sponsors: ] |
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. 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 Resolution: 72x72 Print size: 0.972222x0.638889 Units: PixelsPerInch Type: TrueColor Endianess: Undefined Colorspace: RGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit Channel statistics: red: min: 37 (0.145098) max: 255 (1) mean: 145.58 (0.5709) standard deviation: 67.3195 (0.263998) green: min: 31 (0.121569) max: 255 (1) mean: 89.2512 (0.350005) standard deviation: 52.0488 (0.204113) blue: min: 17 (0.0666667) max: 255 (1) mean: 80.4075 (0.315323) standard deviation: 54.0052 (0.211785) Rendering intent: Undefined 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: 100 Orientation: Undefined Properties: create-date: 2008-01-08T11:08:52-05:00 jpeg:colorspace: 2 jpeg:sampling-factor: 2x2,1x1,1x1 modify-date: 2005-04-07T12:48:13-04:00 signature: dcd00d6303f80f4fa53f991804cb026151c1e851b7a96255e82da87299583ebc Artifacts: verbose: true Tainted: False Filesize: 3.97266kb Number pixels: 3.14453kb Version: ImageMagick 6.4.2 05/01/08 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 mage.raw RGB 640x480 DirectClass 9kb 0.000u 0:01 You can find additional examples of using identify in Examples of ImageMagick Usage. The identify command recognizes these options. Click on an option to get more details about how that option works.
To return the number of unique colors in your image, add -define identify:unique=true to your command-line |