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