]> granicus.if.org Git - imagemagick/blob - www/identify.html
(no commit message)
[imagemagick] / www / identify.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en" xsi:schemaLocation="http://www.w3.org/1999/xhtml                           http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
3 <head>
4   <meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
5   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"></meta>
6   <title>ImageMagick: Command-line Tools: Identify</title>
7   <meta http-equiv="content-language" content="en-US"></meta>
8   <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
9   <meta http-equiv="reply-to" content="magick-users@imagemagick.org"></meta>
10   <meta name="application-name" content="ImageMagick"></meta>
11   <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition, resize, rotate, shear, distort or transform images automagically."></meta>
12   <meta name="application-url" content="http://www.imagemagick.org"></meta>
13   <meta name="generator" content="PHP"></meta>
14   <meta name="keywords" content="command-line, tools:, identify, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand"></meta>
15   <meta name="rating" content="GENERAL"></meta>
16   <meta name="robots" content="INDEX, FOLLOW"></meta>
17   <meta name="generator" content="ImageMagick Studio LLC"></meta>
18   <meta name="author" content="ImageMagick Studio LLC"></meta>
19   <meta name="revisit-after" content="2 DAYS"></meta>
20   <meta name="resource-type" content="document"></meta>
21   <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"></meta>
22   <meta name="distribution" content="Global"></meta>
23   <link rel="icon" href="../images/wand.png"></link>
24   <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"></link>
25   <link rel="canonical" href="http://www.imagemagick.org"></link>
26   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"></link>
27
28   <!-- Add jQuery library -->
29   <script type="text/javascript" src="http://localhost/ajax/libs/jquery/1.7/jquery.min.js"></script>
30   
31   <!-- Add mousewheel plugin (this is optional) -->
32   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
33   
34   <!-- Add fancyBox -->
35   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen"></link>
36   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script>
37   
38   <!-- Optionally add helpers - button, thumbnail and/or media -->
39   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" type="text/css" media="screen"></link>
40   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
41   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script>
42   
43   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.6" type="text/css" media="screen"></link>
44   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.6"></script>
45   
46   <script type="text/javascript">
47         $(document).ready(function() {
48                 $(".fancybox").fancybox();
49         });
50   </script>
51
52   <!-- ImageMagick style -->
53   <style type="text/css" media="all">
54     @import url("../www/magick.css");
55   </style>
56 </head>
57
58 <body id="www-imagemagick-org">
59
60
61
62 <div class="titlebar">
63 <div style="margin: 17px auto; float: left;">
64   <script type="text/javascript">
65   <!--
66     google_ad_client = "pub-3129977114552745";
67     google_ad_slot = "5439289906";
68     google_ad_width = 728;
69     google_ad_height = 90;
70   //-->
71   </script>
72   
73 </div>
74 <a href="../discourse-server">
75   <img src="../images/logo.jpg" alt="ImageMagick Logo" style="width: 123px; height: 118px; border: 0px; float: right;"></img></a>
76 <a href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">
77   <img src="../images/sprite.jpg" alt="ImageMagick Sprite" style="width: 114px; height: 118px; border: 0px; float: right;"></img></a>
78 </div>
79
80 <div class="westbar">
81
82 <div class="menu">
83   <a title="About ImageMagick" href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">About ImageMagick</a>
84 </div>
85 <div class="menu">
86   <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
87 </div>
88 <div class="sub">
89     <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
90 </div>
91 <div class="sub">
92     <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
93 </div>
94 <div class="sub">
95     <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
96 </div>
97 <div class="sub">
98     <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
99 </div>
100 <div class="sep"></div>
101 <div class="menu">
102   <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
103 </div>
104 <div class="sub">
105     <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
106 </div>
107 <div class="sub">
108     <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
109 </div>
110 <div class="sub">
111     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
112 </div>
113 <div class="menu">
114   <a title="Program Interfaces" href="api.html">Program Interfaces</a>
115 </div>
116 <div class="sub">
117     <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
118 </div>
119 <div class="sub">
120     <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
121 </div>
122 <div class="sub">
123     <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
124 </div>
125 <div class="sub">
126     <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
127 </div>
128 <div class="sep"></div>
129 <div class="menu">
130    <a title="Install from Source" href="install-source.html">Install from Source</a>
131 </div>
132 <div class="sub">
133     <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
134 </div>
135 <div class="sub">
136     <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
137  </div>
138 <div class="menu">
139   <a title="Resources" href="resources.html">Resources</a>
140 </div>
141 <div class="menu">
142   <a title="Architecture" href="architecture.html">Architecture</a>
143 </div>
144 <div class="menu">
145   <a title="Download" href="download.html">Download</a>
146 </div>
147 <div class="sep"></div>
148 <div class="menu">
149   <a title="Search" href="search.html">Search</a>
150 </div>
151 <div class="sep"></div>
152 <div class="menu">
153   <a title="Site Map" href="sitemap.html">Site Map</a>
154 </div>
155 <div class="sub">
156   <a title="Site Map: Links" href="links.html">Links</a>
157 </div>
158 <div class="sep"></div>
159 </div>
160
161 <div class="eastbar">
162   
163   <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.imagemagick.org/"></a></div>
164   <noscript>
165     <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
166     <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0"></img></a>
167   </noscript>
168     
169     
170 </div>
171
172 <div class="main">
173
174
175
176 <h1>ImageMagick Identify Command-line Tool</h1>
177 <p class="navigation-index">[<a href="identify.html#usage">Example Usage</a> • <a href="identify.html#options">Option Summary</a>]</p>
178
179 <div class="doc-section">
180 <p>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>
181 </div>
182
183 <h2><a id="usage"></a>Example Usage</h2>
184 <div class="doc-section">
185
186 <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>
187
188 <p class="crt"><span class="crtprompt"> $magick&gt; </span><span class="crtin">identify rose.jpg</span><span class="crtout"> rose.jpg JPEG 640x480 sRGB 87kb 0.050u 0:01</span></p>
189 <p>Next, we look at the same image in greater detail:</p>
190
191 <p class="crt"><span class="crtprompt"> $magick&gt; </span><span class="crtin">identify -verbose rose.jpg</span><span class="crtout">Image: rose.jpg  <br></br>
192     Format: JPEG (Joint Photographic Experts Group JFIF format)  <br></br>
193     Class: DirectClass  <br></br>
194     Geometry: 70x46+0+0  <br></br>
195     Resolution: 72x72  <br></br>
196     Print size: 0.972222x0.638889  <br></br>
197     Units: PixelsPerInch  <br></br>
198     Type: TrueColor  <br></br>
199     Endianess: Undefined  <br></br>
200     Colorspace: RGB  <br></br>
201     Depth: 8-bit  <br></br>
202     Channel depth:  <br></br>
203       red: 8-bit  <br></br>
204       green: 8-bit  <br></br>
205       blue: 8-bit  <br></br>
206     Channel statistics:  <br></br>
207       red:  <br></br>
208         min: 37 (0.145098)  <br></br>
209         max: 255 (1)  <br></br>
210         mean: 145.58 (0.5709)  <br></br>
211         standard deviation: 67.3195 (0.263998)  <br></br>
212       green:  <br></br>
213         min: 31 (0.121569)  <br></br>
214         max: 255 (1)  <br></br>
215         mean: 89.2512 (0.350005)  <br></br>
216         standard deviation: 52.0488 (0.204113)  <br></br>
217       blue:  <br></br>
218         min: 17 (0.0666667)  <br></br>
219         max: 255 (1)  <br></br>
220         mean: 80.4075 (0.315323)  <br></br>
221         standard deviation: 54.0052 (0.211785)  <br></br>
222     Rendering intent: Undefined  <br></br>
223     Interlace: None  <br></br>
224     Background color: white  <br></br>
225     Border color: rgb(223,223,223)  <br></br>
226     Matte color: grey74  <br></br>
227     Transparent color: black  <br></br>
228     Page geometry: 70x46+0+0  <br></br>
229     Dispose: Undefined  <br></br>
230     Iterations: 0  <br></br>
231     Compression: JPEG  <br></br>
232     Quality: 100  <br></br>
233     Orientation: Undefined  <br></br>
234     Properties:  <br></br>
235       date:create: 2008-01-08T11:08:52-05:00  <br></br>
236       date:modify: 2005-04-07T12:48:13-04:00  <br></br>
237       jpeg:colorspace: 2  <br></br>
238       jpeg:sampling-factor: 2x2,1x1,1x1  <br></br>
239       signature: dcd00d6303f80f4fa53f991804cb026151c1e851b7a96255e82da87299583ebc  <br></br>
240     Artifacts:  <br></br>
241       verbose: true  <br></br>
242     Tainted: False  <br></br>
243     Filesize: 3.97266kb  <br></br>
244     Number pixels: 3.14453kb  <br></br>
245     Version: ImageMagick 7.0.0-0 2013-07-15 Q16 http://www.imagemagick.org</span></p>
246 <p>To get the print size in inches of an image at 72 DPI, use:</p>
247
248 <p class="crt"><span class="crtprompt"> $magick&gt; </span><span class="crtin">identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png</span><span class="crtout">8.5 x 11 inches</span></p>
249 <p>The depth and dimensions of a raw image must be specified on the command line:</p>
250
251 <p class="crt"><span class="crtprompt"> $magick&gt; </span><span class="crtin">identify -depth 8 -size 640x480 image.raw</span><span class="crtout">image.raw RGB 640x480 sRGB 9kb 0.000u 0:01</span></p>
252 <p>Here we display the image texture features, image moments, and the number of unique colors in the image:</p>
253
254 <p class="crt"><span class="crtprompt"> $magick&gt; </span><span class="crtin">identify -verbose -features 1 -moments -unique image.png</span></p>
255 <p>Here is a special define that outputs the location of the minimum or maximum pixel of the image:</p>
256
257 <p class="crt"><span class="crtprompt"> $magick&gt; </span><span class="crtin">identify -precision 5 -define identify:locate=maximum -define identify:limit=3 image.png</span></p>
258 <p>You can find additional examples of using <code>identify</code> in <a href="http://www.imagemagick.org/Usage/">Examples of ImageMagick Usage</a>.</p>
259
260 </div>
261
262 <h2><a id="options"></a>Option Summary</h2>
263 <div class="doc-section">
264
265 <p>The <code>identify</code> command recognizes these options.  Click on an option to get more details about how that option works.</p>
266
267 <table class="doc">
268   <tbody>
269   <tr>
270     <th align="left">Option</th>
271     <th align="left">Description</th>
272   </tr>
273
274   <tr>
275     <td valign="top"><a href="command-line-options.html#alpha">-alpha</a></td>
276     <td valign="top">on, activate, off, deactivate, set, opaque, copy",
277 transparent, extract, background, or shape the alpha channel</td>
278   </tr>
279
280   <tr>
281     <td valign="top"><a href="command-line-options.html#antialias">-antialias</a></td>
282     <td valign="top">remove pixel-aliasing</td>
283   </tr>
284
285   <tr>
286     <td valign="top"><a href="command-line-options.html#authenticate">-authenticate <em class="option">value</em></a></td>
287     <td valign="top">decrypt image with this password</td>
288   </tr>
289
290   <tr>
291     <td valign="top"><a href="command-line-options.html#channel">-channel <em class="option">type</em></a></td>
292     <td valign="top">apply option to select image channels</td>
293   </tr>
294
295   <tr>
296     <td valign="top"><a href="command-line-options.html#clip">-clip</a></td>
297     <td valign="top">clip along the first path from the 8BIM profile</td>
298   </tr>
299
300   <tr>
301     <td valign="top"><a href="command-line-options.html#clip-mask">-clip-mask</a> <em class="option">filename</em></td>
302     <td valign="top">associate clip mask with the image</td>
303   </tr>
304
305   <tr>
306     <td valign="top"><a href="command-line-options.html#clip-path">-clip-path <em class="option">id</em></a></td>
307     <td valign="top">clip along a named path from the 8BIM profile</td>
308   </tr>
309
310   <tr>
311     <td valign="top"><a href="command-line-options.html#colorspace">-colorspace <em class="option">type</em></a></td>
312     <td valign="top">set image colorspace</td>
313   </tr>
314
315   <tr>
316     <td valign="top"><a href="command-line-options.html#crop">-crop <em class="option">geometry</em></a></td>
317     <td valign="top">crop the image</td>
318   </tr>
319
320   <tr>
321     <td valign="top"><a href="command-line-options.html#debug">-debug <em class="option">events</em></a></td>
322     <td valign="top">display copious debugging information</td>
323   </tr>
324
325   <tr>
326     <td valign="top"><a href="command-line-options.html#define">-define <em class="option">format:option</em></a></td>
327     <td valign="top">define one or more image format options</td>
328   </tr>
329
330   <tr>
331     <td valign="top"><a href="command-line-options.html#density">-density <em class="option">geometry</em></a></td>
332     <td valign="top">horizontal and vertical density of the image</td>
333   </tr>
334
335   <tr>
336     <td valign="top"><a href="command-line-options.html#depth">-depth <em class="option">value</em></a></td>
337     <td valign="top">image depth</td>
338   </tr>
339
340   <tr>
341     <td valign="top"><a href="command-line-options.html#endian">-endian <em class="option">type</em></a></td>
342     <td valign="top">endianness (MSB or LSB) of the image</td>
343   </tr>
344
345   <tr>
346     <td valign="top"><a href="command-line-options.html#extract">-extract <em class="option">geometry</em></a></td>
347     <td valign="top">extract area from image</td>
348   </tr>
349
350   <tr>
351     <td valign="top"><a href="command-line-options.html#features">-features <em class="option">distance</em></a></td>
352     <td valign="top">analyze image features (e.g. contract, correlations, etc.).</td>
353   </tr>
354
355   <tr>
356     <td valign="top"><a href="command-line-options.html#format_identify_">-format <em class="option">string</em></a></td>
357     <td valign="top">output formatted image characteristics</td>
358   </tr>
359
360   <tr>
361     <td valign="top"><a href="command-line-options.html#gamma">-gamma <em class="option">value</em></a></td>
362     <td valign="top">level of gamma correction</td>
363   </tr>
364
365   <tr>
366     <td valign="top"><a href="command-line-options.html#intensity">-grayscale <em class="option">method</em></a></td>
367     <td valign="top">convert image to grayscale</td>
368   </tr>
369
370   <tr>
371     <td valign="top"><a href="command-line-options.html#help">-help</a></td>
372     <td valign="top">print program options</td>
373   </tr>
374
375   <tr>
376     <td valign="top"><a href="command-line-options.html#interlace">-interlace <em class="option">type</em></a></td>
377     <td valign="top">type of image interlacing scheme</td>
378   </tr>
379
380   <tr>
381     <td valign="top"><a href="command-line-options.html#interpolate">-interpolate <em class="option">method</em></a></td>
382     <td valign="top">pixel color interpolation method</td>
383   </tr>
384
385   <tr>
386     <td valign="top"><a href="command-line-options.html#limit">-limit <em class="option">type value</em></a></td>
387     <td valign="top">pixel cache resource limit</td>
388   </tr>
389
390   <tr>
391     <td valign="top"><a href="command-line-options.html#list">-list <em class="option">type</em></a></td>
392     <td valign="top">Color, Configure, Delegate, Format, Magic, Module, Resource, or Type</td>
393   </tr>
394
395   <tr>
396     <td valign="top"><a href="command-line-options.html#log">-log <em class="option">format</em></a></td>
397     <td valign="top">format of debugging information</td>
398   </tr>
399
400   <tr>
401     <td valign="top"><a href="command-line-options.html#mask">-mask <em class="option">filename</em></a></td>
402     <td valign="top">associate a mask with the image</td>
403   </tr>
404
405   <tr>
406     <td valign="top"><a href="command-line-options.html#moments">-moments</a></td>
407     <td valign="top">display image moments.</td>
408   </tr>
409
410   <tr>
411     <td valign="top"><a href="command-line-options.html#monitor">-monitor</a></td>
412     <td valign="top">monitor progress</td>
413   </tr>
414
415   <tr>
416     <td valign="top"><a href="command-line-options.html#negate">-negate</a></td>
417     <td valign="top">replace each pixel with its complementary color </td>
418   </tr>
419
420   <tr>
421     <td valign="top"><a href="command-line-options.html#precision">-precision <em class="option">value</em></a></td>
422     <td valign="top">set the maximum number of significant digits to be printed</td>
423   </tr>
424
425   <tr>
426     <td valign="top"><a href="command-line-options.html#quiet">-quiet</a></td>
427     <td valign="top">suppress all warning messages</td>
428   </tr>
429
430   <tr>
431     <td valign="top"><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
432     <td valign="top">pay attention to warning messages.</td>
433   </tr>
434
435   <tr>
436     <td valign="top"><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
437     <td valign="top">settings remain in effect until parenthesis boundary.</td>
438   </tr>
439
440   <tr>
441     <td valign="top"><a href="command-line-options.html#sampling-factor">-sampling-factor <em class="option">geometry</em></a></td>
442     <td valign="top">horizontal and vertical sampling factor</td>
443   </tr>
444
445   <tr>
446     <td valign="top"><a href="command-line-options.html#set">-set <em class="option">attribute value</em></a></td>
447     <td valign="top">set an image attribute</td>
448   </tr>
449
450   <tr>
451     <td valign="top"><a href="command-line-options.html#size">-size <em class="option">geometry</em></a></td>
452     <td valign="top">width and height of image</td>
453   </tr>
454
455   <tr>
456     <td valign="top"><a href="command-line-options.html#strip">-strip</a></td>
457     <td valign="top">strip image of all profiles and comments</td>
458   </tr>
459
460   <tr>
461     <td valign="top"><a href="command-line-options.html#unique">-unique</a></td>
462     <td valign="top">display image the number of unique colors in the image.</td>
463   </tr>
464
465   <tr>
466     <td valign="top"><a href="command-line-options.html#units">-units <em class="option">type</em></a></td>
467     <td valign="top">the units of image resolution</td>
468   </tr>
469
470   <tr>
471     <td valign="top"><a href="command-line-options.html#verbose">-verbose</a></td>
472     <td valign="top">print detailed information about the image</td>
473   </tr>
474
475   <tr>
476     <td valign="top"><a href="command-line-options.html#version">-version</a></td>
477     <td valign="top">print version information</td>
478   </tr>
479
480   <tr>
481     <td valign="top"><a href="command-line-options.html#virtual-pixel">-virtual-pixel <em class="option">method</em></a></td>
482     <td valign="top">access method for pixels outside the boundaries of the image</td>
483   </tr>
484
485   </tbody>
486 </table>
487
488 </div>
489
490 </div>
491
492 <div id="linkbar">
493     <span id="linkbar-west"> </span>
494
495     <span id="linkbar-center">
496       <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
497       <a href="../discourse-server">Discourse Server</a> •
498       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a> •
499       <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
500     </span>
501     <span id="linkbar-east"> </span>
502 </div>
503 <div class="footer">
504   <span id="footer-west">©  1999-2013 ImageMagick Studio LLC</span>
505   <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
506 </div>
507 <div style="clear: both; margin: 0; width: 100%; "></div>
508 </body>
509 </html>