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