]> granicus.if.org Git - imagemagick/blob - www/identify.html
(no commit message)
[imagemagick] / www / identify.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4   <meta charset="utf-8">
5   <meta http-equiv="X-UA-Compatible" content="IE=edge">
6   <meta name="viewport" content="width=device-width, initial-scale=1">
7   <title>ImageMagick: Command-line Tools: Identify</title>
8   <meta http-equiv="content-language" content="en-US">
9   <meta http-equiv="content-type" content="text/html; charset=utf-8">
10   <meta http-equiv="reply-to" content="magick-users@imagemagick.org">
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="http://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-2015 ImageMagick Studio LLC">
23   <meta name="distribution" content="Global">
24   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
25   <link rel="icon" href="../images/wand.png">
26   <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon">
27   <link rel="stylesheet" href="css/bootstrap.min.css">
28   <link rel="stylesheet" href="css/magick.css">
29 </head>
30
31 <body>
32 <div class="main">
33 <div class="magick-masthead">
34   <div class="container">
35     <script type="text/javascript">
36     <!--
37       google_ad_client = "pub-3129977114552745";
38       google_ad_slot = "5439289906";
39       google_ad_width = 728;
40       google_ad_height = 90;
41     //-->
42     </script>
43     <center><script type="text/javascript" src="http://localhost/pagead/show_ads.js">
44     </script></center>
45     <nav class="magick-nav">
46       <a class="magick-nav-item " href="../index.html">Home</a>
47       <a class="magick-nav-item " href="binary-releases.html">Downloads</a>
48       <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
49       <a class="magick-nav-item " href="command-line-options.html">Options</a>
50       <a class="magick-nav-item " href="api.html">Development</a>
51       <a class="magick-nav-item" href="http://www.imagemagick.org/discourse-server/">Community</a>
52       <a class="magick-nav-item pull-right " href="http://www.imagemagick.org/script/search.php">Search</a>
53     </nav>
54   </div>
55 </div>
56 <div class="container">
57 <div class="magick-header">
58 <p class="text-center"><a href="identify.html#usage">Example Usage</a> • <a href="identify.html#options">Option Summary</a></p>
59
60 <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>
61
62 <h2 class="magick-header"><a id="usage"></a>Example Usage</h2>
63
64 <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
66 <pre>
67 -&gt; identify rose.jpg
68 rose.jpg JPEG 70x46 70x46+0+0 8-bit sRGB 2.36KB 0.000u 0:00.000
69 </pre>
70
71 <p>Next, we look at the same image in greater detail:</p>
72
73 <pre class="pre-scrollable">-&gt; identify -verbose rose.jpg
74 Image: rose.jpg
75   Format: JPEG (Joint Photographic Experts Group JFIF format)
76   Mime type: images/jpeg
77   Class: DirectClass
78   Geometry: 70x46+0+0
79   Units: Undefined
80   Type: TrueColor
81   Endianess: Undefined
82   Colorspace: sRGB
83   Depth: 8-bit
84   Channel depth:
85     red: 8-bit
86     green: 8-bit
87     blue: 8-bit
88   Channel statistics:
89     Pixels: 3220
90     Red:
91       min: 35 (0.137255)
92       max: 255 (1)
93       mean: 145.57 (0.570865)
94       standard deviation: 67.2976 (0.263912)
95       kurtosis: -1.37971
96       skewness: 0.0942169
97       entropy: 0.974889
98     Green:
99       min: 33 (0.129412)
100       max: 255 (1)
101       mean: 89.2193 (0.349879)
102       standard deviation: 52.0803 (0.204236)
103       kurtosis: 2.70722
104       skewness: 1.82562
105       entropy: 0.877139
106     Blue:
107       min: 11 (0.0431373)
108       max: 255 (1)
109       mean: 80.3742 (0.315193)
110       standard deviation: 53.8536 (0.21119)
111       kurtosis: 2.90978
112       skewness: 1.92617
113       entropy: 0.866692
114   Image statistics:
115     Overall:
116       min: 11 (0.0431373)
117       max: 255 (1)
118       mean: 105.055 (0.411979)
119       standard deviation: 58.1422 (0.228008)
120       kurtosis: 1.25759
121       skewness: 1.4277
122       entropy: 0.90624
123   Rendering intent: Perceptual
124   Gamma: 0.454545
125   Chromaticity:
126     red primary: (0.64,0.33)
127     green primary: (0.3,0.6)
128     blue primary: (0.15,0.06)
129     white point: (0.3127,0.329)
130   Background color: white
131   Border color: srgb(223,223,223)
132   Matte color: grey74
133   Transparent color: black
134   Interlace: None
135   Intensity: Undefined
136   Compose: Over
137   Page geometry: 70x46+0+0
138   Dispose: Undefined
139   Iterations: 0
140   Compression: JPEG
141   Quality: 92
142   Orientation: Undefined
143   Properties:
144     date:create: 2014-11-09T09:00:35-05:00
145     date:modify: 2014-11-09T09:00:35-05:00
146     jpeg:colorspace: 2
147     jpeg:sampling-factor: 2x2,1x1,1x1
148     signature: 22a99838bd5594250f706d1d9383b2830f439fcbaf1455cbe2f7f59a4deb065a
149   Artifacts:
150     filename: rose.jpg
151     verbose: true
152   Tainted: False
153   Filesize: 2.36KB
154   Number pixels: 3.22K
155   Pixels per second: 3.22EB
156   User time: 0.000u
157   Elapsed time: 0:01.000
158   Version: ImageMagick Q16 http://www.imagemagick.org
159 </pre>
160
161 <p>To get the print size in inches of an image at 72 DPI, use:</p>
162
163 <pre>
164 -&gt; identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png
165 8.5 x 11 inches
166 </pre>
167
168 <p>The depth and dimensions of a raw image must be specified on the command line:</p>
169
170 <pre>
171 -&gt; identify -depth 8 -size 640x480 image.raw
172 image.raw RGB 640x480 sRGB 9kb 0.000u 0:01
173 </pre>
174
175 <p>Here we display the image texture features, moments, perceptual hash, and the number of unique colors in the image:</p>
176
177 <pre>
178 -&gt; identify -verbose -features 1 -moments -unique image.png
179 </pre>
180
181 <p>Here is a special define that outputs the location of the minimum or maximum pixel of the image:</p>
182
183 <pre>
184 identify -precision 5 -define identify:locate=maximum -define identify:limit=3 image.png
185 </pre>
186
187 <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>
188
189 <h2 class="magick-header"><a id="options"></a>Option Summary</h2>
190
191 <p>The <code>identify</code> command recognizes these options.  Click on an option to get more details about how that option works.</p>
192
193 <table class="table table-condensed table-striped">
194   <tbody>
195   <tr>
196     <th align="left">Option</th>
197     <th align="left">Description</th>
198   </tr>
199
200   <tr>
201     <td><a href="command-line-options.html#alpha">-alpha</a></td>
202     <td>on, activate, off, deactivate, set, opaque, copy",
203 transparent, extract, background, or shape the alpha channel</td>
204   </tr>
205
206   <tr>
207     <td><a href="command-line-options.html#antialias">-antialias</a></td>
208     <td>remove pixel-aliasing</td>
209   </tr>
210
211   <tr>
212     <td><a href="command-line-options.html#authenticate">-authenticate <var>value</var></a></td>
213     <td>decrypt image with this password</td>
214   </tr>
215
216   <tr>
217     <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
218     <td>apply option to select image channels</td>
219   </tr>
220
221   <tr>
222     <td><a href="command-line-options.html#clip">-clip</a></td>
223     <td>clip along the first path from the 8BIM profile</td>
224   </tr>
225
226   <tr>
227     <td><a href="command-line-options.html#clip-mask">-clip-mask</a> <var>filename</var></td>
228     <td>associate clip mask with the image</td>
229   </tr>
230
231   <tr>
232     <td><a href="command-line-options.html#clip-path">-clip-path <var>id</var></a></td>
233     <td>clip along a named path from the 8BIM profile</td>
234   </tr>
235
236   <tr>
237     <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
238     <td>set image colorspace</td>
239   </tr>
240
241   <tr>
242     <td><a href="command-line-options.html#crop">-crop <var>geometry</var></a></td>
243     <td>crop the image</td>
244   </tr>
245
246   <tr>
247     <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
248     <td>display copious debugging information</td>
249   </tr>
250
251   <tr>
252     <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
253     <td>define one or more image format options</td>
254   </tr>
255
256   <tr>
257     <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
258     <td>horizontal and vertical density of the image</td>
259   </tr>
260
261   <tr>
262     <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
263     <td>image depth</td>
264   </tr>
265
266   <tr>
267     <td><a href="command-line-options.html#endian">-endian <var>type</var></a></td>
268     <td>endianness (MSB or LSB) of the image</td>
269   </tr>
270
271   <tr>
272     <td><a href="command-line-options.html#extract">-extract <var>geometry</var></a></td>
273     <td>extract area from image</td>
274   </tr>
275
276   <tr>
277     <td><a href="command-line-options.html#features">-features <var>distance</var></a></td>
278     <td>analyze image features (e.g. contract, correlations, etc.).</td>
279   </tr>
280
281   <tr>
282     <td><a href="command-line-options.html#format_identify_">-format <var>string</var></a></td>
283     <td>output formatted image characteristics</td>
284   </tr>
285
286   <tr>
287     <td><a href="command-line-options.html#gamma">-gamma <var>value</var></a></td>
288     <td>level of gamma correction</td>
289   </tr>
290
291   <tr>
292     <td><a href="command-line-options.html#intensity">-grayscale <var>method</var></a></td>
293     <td>convert image to grayscale</td>
294   </tr>
295
296   <tr>
297     <td><a href="command-line-options.html#help">-help</a></td>
298     <td>print program options</td>
299   </tr>
300
301   <tr>
302     <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
303     <td>type of image interlacing scheme</td>
304   </tr>
305
306   <tr>
307     <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
308     <td>pixel color interpolation method</td>
309   </tr>
310
311   <tr>
312     <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
313     <td>pixel cache resource limit</td>
314   </tr>
315
316   <tr>
317     <td><a href="command-line-options.html#list">-list <var>type</var></a></td>
318     <td>Color, Configure, Delegate, Format, Magic, Module, Resource, or Type</td>
319   </tr>
320
321   <tr>
322     <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
323     <td>format of debugging information</td>
324   </tr>
325
326   <tr>
327     <td><a href="command-line-options.html#mask">-mask <var>filename</var></a></td>
328     <td>associate a mask with the image</td>
329   </tr>
330
331   <tr>
332     <td><a href="command-line-options.html#moments">-moments</a></td>
333     <td>display image moments and perceptual hash.</td>
334   </tr>
335
336   <tr>
337     <td><a href="command-line-options.html#monitor">-monitor</a></td>
338     <td>monitor progress</td>
339   </tr>
340
341   <tr>
342     <td><a href="command-line-options.html#negate">-negate</a></td>
343     <td>replace each pixel with its complementary color </td>
344   </tr>
345
346   <tr>
347     <td><a href="command-line-options.html#precision">-precision <var>value</var></a></td>
348     <td>set the maximum number of significant digits to be printed</td>
349   </tr>
350
351   <tr>
352     <td><a href="command-line-options.html#quiet">-quiet</a></td>
353     <td>suppress all warning messages</td>
354   </tr>
355
356   <tr>
357     <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
358     <td>pay attention to warning messages.</td>
359   </tr>
360
361   <tr>
362     <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
363     <td>settings remain in effect until parenthesis boundary.</td>
364   </tr>
365
366   <tr>
367     <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
368     <td>horizontal and vertical sampling factor</td>
369   </tr>
370
371   <tr>
372     <td><a href="command-line-options.html#set">-set <var>attribute value</var></a></td>
373     <td>set an image attribute</td>
374   </tr>
375
376   <tr>
377     <td><a href="command-line-options.html#size">-size <var>geometry</var></a></td>
378     <td>width and height of image</td>
379   </tr>
380
381   <tr>
382     <td><a href="command-line-options.html#strip">-strip</a></td>
383     <td>strip image of all profiles and comments</td>
384   </tr>
385
386   <tr>
387     <td><a href="command-line-options.html#unique">-unique</a></td>
388     <td>display image the number of unique colors in the image.</td>
389   </tr>
390
391   <tr>
392     <td><a href="command-line-options.html#units">-units <var>type</var></a></td>
393     <td>the units of image resolution</td>
394   </tr>
395
396   <tr>
397     <td><a href="command-line-options.html#verbose">-verbose</a></td>
398     <td>print detailed information about the image</td>
399   </tr>
400
401   <tr>
402     <td><a href="command-line-options.html#version">-version</a></td>
403     <td>print version information</td>
404   </tr>
405
406   <tr>
407     <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
408     <td>access method for pixels outside the boundaries of the image</td>
409   </tr>
410
411   </tbody>
412 </table>
413
414 </div>
415   <footer class="magick-footer">
416     <div class="magick-nav-item pull-left">
417       <a href="support.html">Donate</a>
418     </div>
419     <p><a href="sitemap.html">Sitemap</a> •
420     <a href="links.html">Related</a> •
421     <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Image Studio</a> •
422     <a href="http://jqmagick.imagemagick.org/">JqMagick</a> •
423     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
424 </p>
425     <p><a href="identify.html#">Back to top</a> •
426     <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
427     <p class="small">©  1999-2015 ImageMagick Studio LLC</p>
428   </footer>
429 </div><!-- /.container -->
430
431   <script src="https://localhost/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
432   <script src="../js/bootstrap.min.js"></script>
433   <script type="text/javascript">
434     /* <![CDATA[ */
435     (function() {
436         var s = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
437         s.type = 'text/javascript';
438         s.async = true;
439         s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
440         t.parentNode.insertBefore(s, t);
441     })();
442     /* ]]> */
443   </script>
444 </div>
445 </body>
446 </html>