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