]> 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" \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 <div style="margin: 17px auto; float: left;">\r
53   <script type="text/javascript">\r
54   <!--\r
55     google_ad_client = "pub-3129977114552745";\r
56     google_ad_slot = "5439289906";\r
57     google_ad_width = 728;\r
58     google_ad_height = 90;\r
59   //-->\r
60   </script>\r
61   <script type="text/javascript"\r
62     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
63   </script>\r
64 </div>\r
65 <a href="http://www.imagemagick.org/discourse-server/">\r
66   <img src="../images/logo.jpg"\r
67   alt="ImageMagick Logo"\r
68   style="width: 123px; height: 118px; border: 0px; float: right;" /></a>\r
69 <a href="../index.html">\r
70   <img src="../images/sprite.jpg"\r
71   alt="ImageMagick Sprite"\r
72   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
73 </div>\r
74 \r
75 <div class="westbar">\r
76 \r
77 <div class="menu">
78   <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
79 </div>
80 <div class="sep"></div>\r
81 <div class="menu">
82   <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
83 </div>
84 <div class="sub">
85     <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
86 </div>
87 <div class="sub">
88     <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
89 </div>
90 <div class="sub">
91     <a title="Binary Release: iPhone" href="../www/binary-releases.html#iPhone">iPhone</a>
92 </div>
93 <div class="sub">
94     <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
95 </div>
96 <div class="sep"></div>\r
97 <div class="menu">
98   <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</a>
99 </div>
100 <div class="sub">
101     <a title="Command-line Tools: Processing" href="../www/command-line-processing.html">Processing</a>
102 </div>
103 <div class="sub">
104     <a title="Command-line Tools: Options" href="../www/command-line-options.html">Options</a>
105 </div>
106 <div class="sub">
107     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
108 </div>
109 <div class="menu">
110   <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
111 </div>
112 <div class="sub">
113     <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
114 </div>
115 <div class="sub">
116     <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
117 </div>
118 <div class="sub">
119     <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
120 </div>
121 <div class="sub">
122     <a title="Program Interface: Magick++" href="../www/magick++.html">Magick++</a>
123 </div>
124 <div class="sep"></div>\r
125 <div  class="menu">
126    <a title="Install from Source" href="../www/install-source.html">Install from Source</a>
127 </div>
128 <div class="sub">
129     <a title="Install from Source: Unix" href="../www/install-source.html#unix">Unix</a>
130 </div>
131 <div class="sub">
132     <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
133  </div>
134 <div class="menu">
135   <a title="Resources" href="../www/resources.html">Resources</a>
136 </div>
137 <div class="menu">
138   <a title="Architecture" href="../www/architecture.html">Architecture</a>
139 </div>
140 <div class="menu">
141   <a title="Download" href="../www/download.html">Download</a>
142 </div>
143 <div class="sep"></div>\r
144 <div class="menu">
145   <a title="Search" href="../www/search.html">Search</a>
146 </div>
147 <div class="sep"></div>\r
148 <div class="menu">
149   <a title="Site Map" href="../www/sitemap.html">Site Map</a>
150 </div>
151 <div  class="sub">
152   <a title="Site Map: Links" href="../www/links.html">Links</a>
153 </div>
154 <div class="sep"></div>\r
155 <div  class="menu">
156   <a rel="follow" title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
157
158 <a href="http://www.networkredux.com">
159   <img src="../images/networkredux.png" alt="[sponsor]"
160   style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a>
161 <div class="sponsbox">
162 <div  class="sponsor">
163   <a rel="follow" title="Sponsor: Web Hosting Break" href="http://www.webhostingbreak.com">Web Hosting Break</a><!-- 201109010090 ian@ian-m... -->
164 </div>
165 <div  class="sponsor">
166   <a rel="follow" title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
167 </div>
168 <div  class="sponsor">
169   <a rel="follow" title="Sponsor: Website Hosting" href="http://www.hostreviewgeeks.com">Website Hosting</a><!-- 201109010090 alexanian media -->
170 </div>
171 <div  class="sponsor">
172   <a rel="follow" title="Sponsor: Hotel München" href="http://www.messehotel-erb-muenchen.de">Hotel München</a><!-- 201111010450 cerb -->
173 </div>
174 <div  class="sponsor">
175   <a rel="follow" title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
176 </div>
177 <div  class="sponsor">
178   <a rel="follow" title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
179 </div>
180 <div  class="sponsor">
181   <a rel="follow" title="Sponsor: Web Hosting Reviews" href="http://www.webhostingmasters.com">Web Hosting Reviews</a><!-- 201107011500 affliatelabel -->
182 </div>
183 <div  class="sponsor">
184   <a rel="follow" title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
185 </div>
186 <div  class="sponsor">
187   <a rel="follow" title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
188 </div>
189 <div  class="sponsor">
190    <a rel="follow" title="Sponsor: Fototapete" href=" http://www.allesdruck.de/Fototapete-Tapetendruck,category,8830.html">Fototapete</a><!-- 20110701000080 a-o.de -->
191 </div>
192 </div>
193 </div>
194 </div>\r
195 \r
196 <div class="eastbar">\r
197 \r
198 </div>\r
199 \r
200 <div class="main">\r
201 \r
202 \r
203 \r
204 <h1>ImageMagick Identify Command-line Tool</h1>
205 <p class="navigation-index">[<a href="#usage">Example Usage</a> &bull; <a href="#options">Option Summary</a>]</p>
206
207 <div class="doc-section">
208 <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>
209 </div>
210
211 <h2><a id="usage"></a>Example Usage</h2>
212 <div class="doc-section">
213
214 <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>
215
216 <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>
217 <p>Next, we look at the same image in greater detail:</p>
218
219 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>identify -verbose rose.jpg</span><span class='crtout'>Image: rose.jpg  <br/>
220     Format: JPEG (Joint Photographic Experts Group JFIF format)  <br/>
221     Class: DirectClass  <br/>
222     Geometry: 70x46+0+0  <br/>
223     Resolution: 72x72  <br/>
224     Print size: 0.972222x0.638889  <br/>
225     Units: PixelsPerInch  <br/>
226     Type: TrueColor  <br/>
227     Endianess: Undefined  <br/>
228     Colorspace: RGB  <br/>
229     Depth: 8-bit  <br/>
230     Channel depth:  <br/>
231       red: 8-bit  <br/>
232       green: 8-bit  <br/>
233       blue: 8-bit  <br/>
234     Channel statistics:  <br/>
235       red:  <br/>
236         min: 37 (0.145098)  <br/>
237         max: 255 (1)  <br/>
238         mean: 145.58 (0.5709)  <br/>
239         standard deviation: 67.3195 (0.263998)  <br/>
240       green:  <br/>
241         min: 31 (0.121569)  <br/>
242         max: 255 (1)  <br/>
243         mean: 89.2512 (0.350005)  <br/>
244         standard deviation: 52.0488 (0.204113)  <br/>
245       blue:  <br/>
246         min: 17 (0.0666667)  <br/>
247         max: 255 (1)  <br/>
248         mean: 80.4075 (0.315323)  <br/>
249         standard deviation: 54.0052 (0.211785)  <br/>
250     Rendering intent: Undefined  <br/>
251     Interlace: None  <br/>
252     Background color: white  <br/>
253     Border color: rgb(223,223,223)  <br/>
254     Matte color: grey74  <br/>
255     Transparent color: black  <br/>
256     Page geometry: 70x46+0+0  <br/>
257     Dispose: Undefined  <br/>
258     Iterations: 0  <br/>
259     Compression: JPEG  <br/>
260     Quality: 100  <br/>
261     Orientation: Undefined  <br/>
262     Properties:  <br/>
263       date:create: 2008-01-08T11:08:52-05:00  <br/>
264       date:modify: 2005-04-07T12:48:13-04:00  <br/>
265       jpeg:colorspace: 2  <br/>
266       jpeg:sampling-factor: 2x2,1x1,1x1  <br/>
267       signature: dcd00d6303f80f4fa53f991804cb026151c1e851b7a96255e82da87299583ebc  <br/>
268     Artifacts:  <br/>
269       verbose: true  <br/>
270     Tainted: False  <br/>
271     Filesize: 3.97266kb  <br/>
272     Number pixels: 3.14453kb  <br/>
273     Version: ImageMagick 6.6.9-10 2011-04-06 Q16 http://www.imagemagick.org</span></p>
274 <p>To get the print size in inches of an image at 72 DPI, use:</p>
275
276 <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>
277 <p>The depth and dimensions of a raw image must be specified on the command line:</p>
278
279 <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>
280 <p>Here we display the image texture features and the number of unique colors in the image:</p>
281
282 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>identify -verbose -features 1 -unique image.png</span></p>
283 <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>
284
285 </div>
286
287 <h2><a id="options"></a>Option Summary</h2>
288 <div class="doc-section">
289
290 <p>The <kbd>identify</kbd> command recognizes these options.  Click on an option to get more details about how that option works.</p>
291
292 <table class="doc">
293   <tbody>
294   <tr>
295     <th align="left">Option</th>
296     <th align="left">Description</th>
297   </tr>
298
299   <tr>
300     <td valign="top"><a href="../www/command-line-options.html#alpha">-alpha</a></td>
301     <td valign="top">on, activate, off, deactivate, set, opaque, copy",
302 transparent, extract, background, or shape the alpha channel</td>
303   </tr>
304
305   <tr>
306     <td valign="top"><a href="../www/command-line-options.html#antialias">-antialias</a></td>
307     <td valign="top">remove pixel-aliasing</td>
308   </tr>
309
310   <tr>
311     <td valign="top"><a href="../www/command-line-options.html#authenticate">-authenticate <em class="option">value</em></a></td>
312     <td valign="top">decrypt image with this password</td>
313   </tr>
314
315   <tr>
316     <td valign="top"><a href="../www/command-line-options.html#channel">-channel <em class="option">type</em></a></td>
317     <td valign="top">apply option to select image channels</td>
318   </tr>
319
320   <tr>
321     <td valign="top"><a href="../www/command-line-options.html#colorspace">-colorspace <em class="option">type</em></a></td>
322     <td valign="top">set image colorspace</td>
323   </tr>
324
325   <tr>
326     <td valign="top"><a href="../www/command-line-options.html#crop">-crop <em class="option">geometry</em></a></td>
327     <td valign="top">crop the image</td>
328   </tr>
329
330   <tr>
331     <td valign="top"><a href="../www/command-line-options.html#debug">-debug <em class="option">events</em></a></td>
332     <td valign="top">display copious debugging information</td>
333   </tr>
334
335   <tr>
336     <td valign="top"><a href="../www/command-line-options.html#define">-define <em class="option">format:option</em></a></td>
337     <td valign="top">define one or more image format options</td>
338   </tr>
339
340   <tr>
341     <td valign="top"><a href="../www/command-line-options.html#density">-density <em class="option">geometry</em></a></td>
342     <td valign="top">horizontal and vertical density of the image</td>
343   </tr>
344
345   <tr>
346     <td valign="top"><a href="../www/command-line-options.html#depth">-depth <em class="option">value</em></a></td>
347     <td valign="top">image depth</td>
348   </tr>
349
350   <tr>
351     <td valign="top"><a href="../www/command-line-options.html#extract">-extract <em class="option">geometry</em></a></td>
352     <td valign="top">extract area from image</td>
353   </tr>
354
355   <tr>
356     <td valign="top"><a href="../www/command-line-options.html#features">-features <em class="option">distance</em></a></td>
357     <td valign="top">display image features (e.g. contract, correlations, etc.).</td>
358   </tr>
359
360   <tr>
361     <td valign="top"><a href="../www/command-line-options.html#format_identify_">-format <em class="option">string</em></a></td>
362     <td valign="top">output formatted image characteristics</td>
363   </tr>
364
365   <tr>
366     <td valign="top"><a href="../www/command-line-options.html#gamma">-gamma <em class="option">value</em></a></td>
367     <td valign="top">level of gamma correction</td>
368   </tr>
369
370   <tr>
371     <td valign="top"><a href="../www/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="../www/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="../www/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="../www/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="../www/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="../www/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="../www/command-line-options.html#monitor">-monitor</a></td>
402     <td valign="top">monitor progress</td>
403   </tr>
404
405   <tr>
406     <td valign="top"><a href="../www/command-line-options.html#negate">-negate</a></td>
407     <td valign="top">replace each pixel with its complementary color </td>
408   </tr>
409
410   <tr>
411     <td valign="top"><a href="../www/command-line-options.html#quiet">-quiet</a></td>
412     <td valign="top">suppress all warning messages</td>
413   </tr>
414
415   <tr>
416     <td valign="top"><a href="../www/command-line-options.html#regard-warnings">-regard-warnings</a></td>
417     <td valign="top">pay attention to warning messages.</td>
418   </tr>
419
420   <tr>
421     <td valign="top"><a href="../www/command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
422     <td valign="top">settings remain in effect until parenthesis boundary.</td>
423   </tr>
424
425   <tr>
426     <td valign="top"><a href="../www/command-line-options.html#sampling-factor">-sampling-factor <em class="option">geometry</em></a></td>
427     <td valign="top">horizontal and vertical sampling factor</td>
428   </tr>
429
430   <tr>
431     <td valign="top"><a href="../www/command-line-options.html#set">-set <em class="option">attribute value</em></a></td>
432     <td valign="top">set an image attribute</td>
433   </tr>
434
435   <tr>
436     <td valign="top"><a href="../www/command-line-options.html#size">-size <em class="option">geometry</em></a></td>
437     <td valign="top">width and height of image</td>
438   </tr>
439
440   <tr>
441     <td valign="top"><a href="../www/command-line-options.html#strip">-strip</a></td>
442     <td valign="top">strip image of all profiles and comments</td>
443   </tr>
444
445   <tr>
446     <td valign="top"><a href="../www/command-line-options.html#unique">-unique</a></td>
447     <td valign="top">display image the number of unique colors in the image.</td>
448   </tr>
449
450   <tr>
451     <td valign="top"><a href="../www/command-line-options.html#units">-units <em class="option">type</em></a></td>
452     <td valign="top">the units of image resolution</td>
453   </tr>
454
455   <tr>
456     <td valign="top"><a href="../www/command-line-options.html#verbose">-verbose</a></td>
457     <td valign="top">print detailed information about the image</td>
458   </tr>
459
460   <tr>
461     <td valign="top"><a href="../www/command-line-options.html#version">-version</a></td>
462     <td valign="top">print version information</td>
463   </tr>
464
465   <tr>
466     <td valign="top"><a href="../www/command-line-options.html#virtual-pixel">-virtual-pixel <em class="option">method</em></a></td>
467     <td valign="top">access method for pixels outside the boundaries of the image</td>
468   </tr>
469
470   </tbody>
471 </table>
472
473 </div>
474 \r
475 </div>\r
476 \r
477 <div id="linkbar">\r
478     <span id="linkbar-west">&nbsp;</span>\r
479     <span id="linkbar-center">\r
480       <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;\r
481       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
482     </span>\r
483     <span id="linkbar-east">&nbsp;</span>\r
484   </div>\r
485   <div class="footer">\r
486     <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>\r
487     <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>\r
488   </div>\r
489   <div style="clear: both; margin: 0; width: 100%; "></div>\r
490   <script type="text/javascript">\r
491     var _gaq = _gaq || [];\r
492     _gaq.push(['_setAccount', 'UA-17690367-1']);\r
493     _gaq.push(['_trackPageview']);\r
494 \r
495     (function() {\r
496       var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\r
497       ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\r
498       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\r
499     })();\r
500   </script>\r
501 </body>\r
502 </html>\r