8 <meta charset="utf-8" />
9 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
10 <title>Command-line Tools: Identify @ ImageMagick</title>
11 <meta name="application-name" content="ImageMagick" />
12 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves." />
13 <meta name="application-url" content="https://www.imagemagick.org" />
14 <meta name="generator" content="PHP" />
15 <meta name="keywords" content="command-line, tools:, identify, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" />
16 <meta name="rating" content="GENERAL" />
17 <meta name="robots" content="INDEX, FOLLOW" />
18 <meta name="generator" content="ImageMagick Studio LLC" />
19 <meta name="author" content="ImageMagick Studio LLC" />
20 <meta name="revisit-after" content="2 DAYS" />
21 <meta name="resource-type" content="document" />
22 <meta name="copyright" content="Copyright (c) 1999-2017 ImageMagick Studio LLC" />
23 <meta name="distribution" content="Global" />
24 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
26 <link href="https://www.imagemagick.org/script/identify.html" rel="canonical" />
27 <link href="../images/wand.png" rel="icon" />
28 <link href="../images/wand.ico" rel="shortcut icon" />
29 <link href="css/magick.css" rel="stylesheet" />
32 <div class="magick-masthead">
33 <div class="container">
34 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
36 data-ad-client="ca-pub-3129977114552745"
37 data-ad-slot="6345125851"
38 data-ad-format="auto"></ins>
40 (adsbygoogle = window.adsbygoogle || []).push({});
42 <nav class="nav magick-nav">
43 <a class="nav-link " href="../index.html">Home</a>
44 <a class="nav-link " href="download.html">Download</a>
45 <a class="nav-link " href="command-line-tools.html">Tools</a>
46 <a class="nav-link " href="command-line-processing.html">Command-line</a>
47 <a class="nav-link " href="resources.html">Resources</a>
48 <a class="nav-link " href="develop.html">Develop</a>
49 <a class="nav-link " href="https://www.imagemagick.org/script/search.php">Search</a>
50 <a class="nav-link float-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
54 <div class="container">
55 <div class="magick-header">
56 <p class="text-center"><a href="identify.html#usage">Example Usage</a> • <a href="identify.html#options">Option Summary</a></p>
58 <p class="lead magick-description">The <code>identify</code> 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 <a href="command-line-processing.html">Command Line Processing</a> for advice on how to structure your <code>identify</code> command or see below for example usages of the command.</p>
60 <h2 class="magick-post-title"><a id="usage"></a>Example Usage</h2>
62 <p>We list a few examples of the <code>identify</code> command here to illustrate its usefulness and ease of use. To get started, lets identify an image in the JPEG format:</p>
65 -> magick identify rose.jpg
66 rose.jpg JPEG 70x46 70x46+0+0 8-bit sRGB 2.36KB 0.000u 0:00.000
69 <p>Next, we look at the same image in greater detail:</p>
71 <pre class="pre-scrollable"><code>-> magick identify -verbose rose.jpg
73 Format: JPEG (Joint Photographic Experts Group JFIF format)
74 Mime type: images/jpeg
91 mean: 145.557 (0.570814)
92 standard deviation: 69.1933 (0.271346)
99 mean: 89.246 (0.349984)
100 standard deviation: 52.4608 (0.205729)
107 mean: 80.4196 (0.315371)
108 standard deviation: 54.9377 (0.215442)
116 mean: 105.074 (0.412056)
117 standard deviation: 58.8639 (0.230839)
121 Rendering intent: Perceptual
124 red primary: (0.64,0.33)
125 green primary: (0.3,0.6)
126 blue primary: (0.15,0.06)
127 white point: (0.3127,0.329)
129 Background color: white
130 Border color: srgb(223,223,223)
131 Transparent color: none
135 Page geometry: 70x46+0+0
140 Orientation: Undefined
143 jpeg:sampling-factor: 1x1,1x1,1x1
144 signature: aea65c9b557d779d142f26d04abe7008bab50f1e9647faae20afdcc6c15140d5
151 Elapsed time: 0:01.000
152 Version: ImageMagick 7.0.4-8 Q16 x86_64 http://www.imagemagick.org
155 <p>To get the print size in inches of an image at 72 DPI, use:</p>
158 -> magick identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png
162 <p>The depth and dimensions of a raw image must be specified on the command line:</p>
165 -> magick identify -depth 8 -size 640x480 image.raw
166 image.raw RGB 640x480 sRGB 9kb 0.000u 0:01
169 <p>Here we display the image texture features, moments, perceptual hash, and the number of unique colors in the image:</p>
172 -> magick identify -verbose -features 1 -moments -unique image.png
175 <p>Here is a special define that outputs the location of the minimum or maximum pixel of the image:</p>
178 magick identify -precision 5 -define identify:locate=maximum -define identify:limit=3 image.png
181 <p>You can find additional examples of using <code>identify</code> in <a href="https://www.imagemagick.org/Usage/">Examples of ImageMagick Usage</a>.</p>
183 <h2 class="magick-post-title"><a id="options"></a>Option Summary</h2>
185 <p>The <code>identify</code> command recognizes these options. Click on an option to get more details about how that option works.</p>
187 <table class="table table-sm table-striped">
190 <th align="left">Option</th>
191 <th align="left">Description</th>
195 <td><a href="command-line-options.html#alpha">-alpha</a></td>
196 <td>on, activate, off, deactivate, set, opaque, copy",
197 transparent, extract, background, or shape the alpha channel</td>
201 <td><a href="command-line-options.html#antialias">-antialias</a></td>
202 <td>remove pixel-aliasing</td>
206 <td><a href="command-line-options.html#authenticate">-authenticate <var>value</var></a></td>
207 <td>decrypt image with this password</td>
211 <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
212 <td>apply option to select image channels</td>
216 <td><a href="command-line-options.html#clip">-clip</a></td>
217 <td>clip along the first path from the 8BIM profile</td>
221 <td><a href="command-line-options.html#clip-mask">-clip-mask</a> <var>filename</var></td>
222 <td>associate clip mask with the image</td>
226 <td><a href="command-line-options.html#clip-path">-clip-path <var>id</var></a></td>
227 <td>clip along a named path from the 8BIM profile</td>
231 <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
232 <td>set image colorspace</td>
236 <td><a href="command-line-options.html#crop">-crop <var>geometry</var></a></td>
237 <td>crop the image</td>
241 <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
242 <td>display copious debugging information</td>
246 <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
247 <td>define one or more image format options</td>
251 <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
252 <td>horizontal and vertical density of the image</td>
256 <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
261 <td><a href="command-line-options.html#endian">-endian <var>type</var></a></td>
262 <td>endianness (MSB or LSB) of the image</td>
266 <td><a href="command-line-options.html#extract">-extract <var>geometry</var></a></td>
267 <td>extract area from image</td>
271 <td><a href="command-line-options.html#features">-features <var>distance</var></a></td>
272 <td>analyze image features (e.g. contract, correlations, etc.).</td>
276 <td><a href="command-line-options.html#format_identify_">-format <var>string</var></a></td>
277 <td>output formatted image characteristics</td>
281 <td><a href="command-line-options.html#gamma">-gamma <var>value</var></a></td>
282 <td>level of gamma correction</td>
286 <td><a href="command-line-options.html#intensity">-grayscale <var>method</var></a></td>
287 <td>convert image to grayscale</td>
291 <td><a href="command-line-options.html#help">-help</a></td>
292 <td>print program options</td>
296 <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
297 <td>type of image interlacing scheme</td>
301 <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
302 <td>pixel color interpolation method</td>
306 <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
307 <td>pixel cache resource limit</td>
311 <td><a href="command-line-options.html#list">-list <var>type</var></a></td>
312 <td>Color, Configure, Delegate, Format, Magic, Module, Resource, or Type</td>
316 <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
317 <td>format of debugging information</td>
321 <td><a href="command-line-options.html#mask">-mask <var>filename</var></a></td>
322 <td>associate a mask with the image</td>
326 <td><a href="command-line-options.html#moments">-moments</a></td>
327 <td>display image moments and perceptual hash.</td>
331 <td><a href="command-line-options.html#monitor">-monitor</a></td>
332 <td>monitor progress</td>
336 <td><a href="command-line-options.html#negate">-negate</a></td>
337 <td>replace each pixel with its complementary color </td>
341 <td><a href="command-line-options.html#precision">-precision <var>value</var></a></td>
342 <td>set the maximum number of significant digits to be printed</td>
346 <td><a href="command-line-options.html#quiet">-quiet</a></td>
347 <td>suppress all warning messages</td>
351 <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
352 <td>pay attention to warning messages.</td>
356 <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
357 <td>settings remain in effect until parenthesis boundary.</td>
361 <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
362 <td>horizontal and vertical sampling factor</td>
366 <td><a href="command-line-options.html#set">-set <var>attribute value</var></a></td>
367 <td>set an image attribute</td>
371 <td><a href="command-line-options.html#size">-size <var>geometry</var></a></td>
372 <td>width and height of image</td>
376 <td><a href="command-line-options.html#strip">-strip</a></td>
377 <td>strip image of all profiles and comments</td>
381 <td><a href="command-line-options.html#unique">-unique</a></td>
382 <td>display image the number of unique colors in the image.</td>
386 <td><a href="command-line-options.html#units">-units <var>type</var></a></td>
387 <td>the units of image resolution</td>
391 <td><a href="command-line-options.html#verbose">-verbose</a></td>
392 <td>print detailed information about the image</td>
396 <td><a href="command-line-options.html#version">-version</a></td>
397 <td>print version information</td>
401 <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
402 <td>access method for pixels outside the boundaries of the image</td>
409 <footer class="magick-footer">
410 <p><a href="support.html">Donate</a> •
411 <a href="sitemap.html">Sitemap</a> •
412 <a href="links.html">Related</a> •
413 <a href="security-policy.html">Security</a> •
414 <a href="architecture.html">Architecture</a>
416 <p><a href="identify.html#">Back to top</a> •
417 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> •
418 <a href="https://www.imagemagick.org/script/contact.php">Contact Us</a></p>
419 <p><small>© 1999-2017 ImageMagick Studio LLC</small></p>
421 </div><!-- /.container -->
423 <script src="https://localhost/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
424 <script src="../js/magick.html"></script>
427 <!-- Magick Cache 30th June 2017 09:55 -->