8 <meta charset="utf-8" />
9 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
10 <meta http-equiv="x-ua-compatible" content="ie=edge" />
11 <title>Command-line Tools: Identify @ ImageMagick</title>
12 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
13 <meta name="application-name" content="ImageMagick"/>
14 <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."/>
15 <meta name="application-url" content="https://www.imagemagick.org"/>
16 <meta name="generator" content="PHP"/>
17 <meta name="keywords" content="command-line, tools:, identify, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
18 <meta name="rating" content="GENERAL"/>
19 <meta name="robots" content="INDEX, FOLLOW"/>
20 <meta name="generator" content="ImageMagick Studio LLC"/>
21 <meta name="author" content="ImageMagick Studio LLC"/>
22 <meta name="revisit-after" content="2 DAYS"/>
23 <meta name="resource-type" content="document"/>
24 <meta name="copyright" content="Copyright (c) 1999-2017 ImageMagick Studio LLC"/>
25 <meta name="distribution" content="Global"/>
26 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
27 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
28 <link rel="canonical" href="https://www.imagemagick.org/script/identify.html"/>
29 <link rel="icon" href="../images/wand.png"/>
30 <link rel="shortcut icon" href="../images/wand.ico"/>
31 <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700" />
32 <link rel="stylesheet" href="css/magick.css"/>
36 <div class="magick-masthead">
37 <div class="container">
38 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
40 data-ad-client="ca-pub-3129977114552745"
41 data-ad-slot="6345125851"
42 data-ad-format="auto"></ins>
44 (adsbygoogle = window.adsbygoogle || []).push({});
46 <nav class="magick-nav">
47 <a class="magick-nav-item " href="../index.html">Home</a>
48 <a class="magick-nav-item " href="download.html">Download</a>
49 <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
50 <a class="magick-nav-item " href="command-line-processing.html">Command-line</a>
51 <a class="magick-nav-item " href="resources.html">Resources</a>
52 <a class="magick-nav-item " href="develop.html">Develop</a>
53 <a class="magick-nav-item " href="https://www.imagemagick.org/script/search.php">Search</a>
54 <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
58 <div class="container">
59 <div class="magick-header">
60 <p class="text-center"><a href="identify.html#usage">Example Usage</a> • <a href="identify.html#options">Option Summary</a></p>
62 <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>
64 <h2 class="magick-header"><a id="usage"></a>Example Usage</h2>
66 <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>
69 -> magick identify rose.jpg
70 rose.jpg JPEG 70x46 70x46+0+0 8-bit sRGB 2.36KB 0.000u 0:00.000
73 <p>Next, we look at the same image in greater detail:</p>
75 <pre class="pre-scrollable">-> magick identify -verbose rose.jpg
77 Format: JPEG (Joint Photographic Experts Group JFIF format)
78 Mime type: images/jpeg
95 mean: 145.557 (0.570814)
96 standard deviation: 69.1933 (0.271346)
103 mean: 89.246 (0.349984)
104 standard deviation: 52.4608 (0.205729)
111 mean: 80.4196 (0.315371)
112 standard deviation: 54.9377 (0.215442)
120 mean: 105.074 (0.412056)
121 standard deviation: 58.8639 (0.230839)
125 Rendering intent: Perceptual
128 red primary: (0.64,0.33)
129 green primary: (0.3,0.6)
130 blue primary: (0.15,0.06)
131 white point: (0.3127,0.329)
133 Background color: white
134 Border color: srgb(223,223,223)
135 Transparent color: none
139 Page geometry: 70x46+0+0
144 Orientation: Undefined
147 jpeg:sampling-factor: 1x1,1x1,1x1
148 signature: aea65c9b557d779d142f26d04abe7008bab50f1e9647faae20afdcc6c15140d5
155 Elapsed time: 0:01.000
156 Version: ImageMagick 7.0.4-8 Q16 x86_64 http://www.imagemagick.org
159 <p>To get the print size in inches of an image at 72 DPI, use:</p>
162 -> magick identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png
166 <p>The depth and dimensions of a raw image must be specified on the command line:</p>
169 -> magick identify -depth 8 -size 640x480 image.raw
170 image.raw RGB 640x480 sRGB 9kb 0.000u 0:01
173 <p>Here we display the image texture features, moments, perceptual hash, and the number of unique colors in the image:</p>
176 -> magick identify -verbose -features 1 -moments -unique image.png
179 <p>Here is a special define that outputs the location of the minimum or maximum pixel of the image:</p>
182 magick identify -precision 5 -define identify:locate=maximum -define identify:limit=3 image.png
185 <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>
187 <h2 class="magick-header"><a id="options"></a>Option Summary</h2>
189 <p>The <code>identify</code> command recognizes these options. Click on an option to get more details about how that option works.</p>
191 <table class="table table-condensed table-striped">
194 <th align="left">Option</th>
195 <th align="left">Description</th>
199 <td><a href="command-line-options.html#alpha">-alpha</a></td>
200 <td>on, activate, off, deactivate, set, opaque, copy",
201 transparent, extract, background, or shape the alpha channel</td>
205 <td><a href="command-line-options.html#antialias">-antialias</a></td>
206 <td>remove pixel-aliasing</td>
210 <td><a href="command-line-options.html#authenticate">-authenticate <var>value</var></a></td>
211 <td>decrypt image with this password</td>
215 <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
216 <td>apply option to select image channels</td>
220 <td><a href="command-line-options.html#clip">-clip</a></td>
221 <td>clip along the first path from the 8BIM profile</td>
225 <td><a href="command-line-options.html#clip-mask">-clip-mask</a> <var>filename</var></td>
226 <td>associate clip mask with the image</td>
230 <td><a href="command-line-options.html#clip-path">-clip-path <var>id</var></a></td>
231 <td>clip along a named path from the 8BIM profile</td>
235 <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
236 <td>set image colorspace</td>
240 <td><a href="command-line-options.html#crop">-crop <var>geometry</var></a></td>
241 <td>crop the image</td>
245 <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
246 <td>display copious debugging information</td>
250 <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
251 <td>define one or more image format options</td>
255 <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
256 <td>horizontal and vertical density of the image</td>
260 <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
265 <td><a href="command-line-options.html#endian">-endian <var>type</var></a></td>
266 <td>endianness (MSB or LSB) of the image</td>
270 <td><a href="command-line-options.html#extract">-extract <var>geometry</var></a></td>
271 <td>extract area from image</td>
275 <td><a href="command-line-options.html#features">-features <var>distance</var></a></td>
276 <td>analyze image features (e.g. contract, correlations, etc.).</td>
280 <td><a href="command-line-options.html#format_identify_">-format <var>string</var></a></td>
281 <td>output formatted image characteristics</td>
285 <td><a href="command-line-options.html#gamma">-gamma <var>value</var></a></td>
286 <td>level of gamma correction</td>
290 <td><a href="command-line-options.html#intensity">-grayscale <var>method</var></a></td>
291 <td>convert image to grayscale</td>
295 <td><a href="command-line-options.html#help">-help</a></td>
296 <td>print program options</td>
300 <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
301 <td>type of image interlacing scheme</td>
305 <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
306 <td>pixel color interpolation method</td>
310 <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
311 <td>pixel cache resource limit</td>
315 <td><a href="command-line-options.html#list">-list <var>type</var></a></td>
316 <td>Color, Configure, Delegate, Format, Magic, Module, Resource, or Type</td>
320 <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
321 <td>format of debugging information</td>
325 <td><a href="command-line-options.html#mask">-mask <var>filename</var></a></td>
326 <td>associate a mask with the image</td>
330 <td><a href="command-line-options.html#moments">-moments</a></td>
331 <td>display image moments and perceptual hash.</td>
335 <td><a href="command-line-options.html#monitor">-monitor</a></td>
336 <td>monitor progress</td>
340 <td><a href="command-line-options.html#negate">-negate</a></td>
341 <td>replace each pixel with its complementary color </td>
345 <td><a href="command-line-options.html#precision">-precision <var>value</var></a></td>
346 <td>set the maximum number of significant digits to be printed</td>
350 <td><a href="command-line-options.html#quiet">-quiet</a></td>
351 <td>suppress all warning messages</td>
355 <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
356 <td>pay attention to warning messages.</td>
360 <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
361 <td>settings remain in effect until parenthesis boundary.</td>
365 <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
366 <td>horizontal and vertical sampling factor</td>
370 <td><a href="command-line-options.html#set">-set <var>attribute value</var></a></td>
371 <td>set an image attribute</td>
375 <td><a href="command-line-options.html#size">-size <var>geometry</var></a></td>
376 <td>width and height of image</td>
380 <td><a href="command-line-options.html#strip">-strip</a></td>
381 <td>strip image of all profiles and comments</td>
385 <td><a href="command-line-options.html#unique">-unique</a></td>
386 <td>display image the number of unique colors in the image.</td>
390 <td><a href="command-line-options.html#units">-units <var>type</var></a></td>
391 <td>the units of image resolution</td>
395 <td><a href="command-line-options.html#verbose">-verbose</a></td>
396 <td>print detailed information about the image</td>
400 <td><a href="command-line-options.html#version">-version</a></td>
401 <td>print version information</td>
405 <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
406 <td>access method for pixels outside the boundaries of the image</td>
413 <footer class="magick-footer">
414 <p><a href="support.html">Donate</a> •
415 <a href="sitemap.html">Sitemap</a> •
416 <a href="links.html">Related</a> •
417 <a href="security-policy.html">Security</a> •
418 <a href="architecture.html">Architecture</a>
420 <p><a href="identify.html#">Back to top</a> •
421 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> •
422 <a href="https://www.imagemagick.org/script/contact.php">Contact Us</a></p>
423 <p><small>© 1999-2017 ImageMagick Studio LLC</small></p>
425 </div><!-- /.container -->
427 <script src="https://localhost/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
428 <script src="../js/magick.html"></script>
432 <!-- Magick Cache 17th May 2017 15:05 -->