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