]> 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   <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-2017 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="download.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="develop.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 -> magick 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">-> magick 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: 31 (0.121569)
94       max: 255 (1)
95       mean: 145.557 (0.570814)
96       standard deviation: 69.1933 (0.271346)
97       kurtosis: -1.38945
98       skewness: 0.138955
99       entropy: 0.970683
100     Green:
101       min: 27 (0.105882)
102       max: 255 (1)
103       mean: 89.246 (0.349984)
104       standard deviation: 52.4608 (0.205729)
105       kurtosis: 2.60139
106       skewness: 1.80708
107       entropy: 0.869711
108     Blue:
109       min: 21 (0.0823529)
110       max: 255 (1)
111       mean: 80.4196 (0.315371)
112       standard deviation: 54.9377 (0.215442)
113       kurtosis: 2.93417
114       skewness: 1.95544
115       entropy: 0.853176
116   Image statistics:
117     Overall:
118       min: 21 (0.0823529)
119       max: 255 (1)
120       mean: 105.074 (0.412056)
121       standard deviation: 58.8639 (0.230839)
122       kurtosis: 1.37788
123       skewness: 1.48073
124       entropy: 0.897856
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   Alpha color: grey74
133   Background color: white
134   Border color: srgb(223,223,223)
135   Transparent color: none
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     jpeg:colorspace: 2
147     jpeg:sampling-factor: 1x1,1x1,1x1
148     signature: aea65c9b557d779d142f26d04abe7008bab50f1e9647faae20afdcc6c15140d5
149   Artifacts:
150     verbose: true
151   Tainted: False
152   Filesize: 2.65KB
153   Number pixels: 3.22K
154   User time: 0.000u
155   Elapsed time: 0:01.000
156   Version: ImageMagick 7.0.4-8 Q16 x86_64 http://www.imagemagick.org
157 </pre>
158
159 <p>To get the print size in inches of an image at 72 DPI, use:</p>
160
161 <pre>
162 -> magick identify -format "%[fx:w/72] by %[fx:h/72] inches" document.png
163 8.5 x 11 inches
164 </pre>
165
166 <p>The depth and dimensions of a raw image must be specified on the command line:</p>
167
168 <pre>
169 -> magick identify -depth 8 -size 640x480 image.raw
170 image.raw RGB 640x480 sRGB 9kb 0.000u 0:01
171 </pre>
172
173 <p>Here we display the image texture features, moments, perceptual hash, and the number of unique colors in the image:</p>
174
175 <pre>
176 -> magick identify -verbose -features 1 -moments -unique image.png
177 </pre>
178
179 <p>Here is a special define that outputs the location of the minimum or maximum pixel of the image:</p>
180
181 <pre>
182 magick identify -precision 5 -define identify:locate=maximum -define identify:limit=3 image.png
183 </pre>
184
185 <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>
186
187 <h2 class="magick-header"><a id="options"></a>Option Summary</h2>
188
189 <p>The <code>identify</code> command recognizes these options.  Click on an option to get more details about how that option works.</p>
190
191 <table class="table table-condensed table-striped">
192   <tbody>
193   <tr>
194     <th align="left">Option</th>
195     <th align="left">Description</th>
196   </tr>
197
198   <tr>
199     <td><a href="command-line-options.html#alpha">-alpha</a></td>
200     <td>on, activate, off, deactivate, set, opaque, copy",
201 transparent, extract, background, or shape the alpha channel</td>
202   </tr>
203
204   <tr>
205     <td><a href="command-line-options.html#antialias">-antialias</a></td>
206     <td>remove pixel-aliasing</td>
207   </tr>
208
209   <tr>
210     <td><a href="command-line-options.html#authenticate">-authenticate <var>value</var></a></td>
211     <td>decrypt image with this password</td>
212   </tr>
213
214   <tr>
215     <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
216     <td>apply option to select image channels</td>
217   </tr>
218
219   <tr>
220     <td><a href="command-line-options.html#clip">-clip</a></td>
221     <td>clip along the first path from the 8BIM profile</td>
222   </tr>
223
224   <tr>
225     <td><a href="command-line-options.html#clip-mask">-clip-mask</a> <var>filename</var></td>
226     <td>associate clip mask with the image</td>
227   </tr>
228
229   <tr>
230     <td><a href="command-line-options.html#clip-path">-clip-path <var>id</var></a></td>
231     <td>clip along a named path from the 8BIM profile</td>
232   </tr>
233
234   <tr>
235     <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
236     <td>set image colorspace</td>
237   </tr>
238
239   <tr>
240     <td><a href="command-line-options.html#crop">-crop <var>geometry</var></a></td>
241     <td>crop the image</td>
242   </tr>
243
244   <tr>
245     <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
246     <td>display copious debugging information</td>
247   </tr>
248
249   <tr>
250     <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
251     <td>define one or more image format options</td>
252   </tr>
253
254   <tr>
255     <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
256     <td>horizontal and vertical density of the image</td>
257   </tr>
258
259   <tr>
260     <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
261     <td>image depth</td>
262   </tr>
263
264   <tr>
265     <td><a href="command-line-options.html#endian">-endian <var>type</var></a></td>
266     <td>endianness (MSB or LSB) of the image</td>
267   </tr>
268
269   <tr>
270     <td><a href="command-line-options.html#extract">-extract <var>geometry</var></a></td>
271     <td>extract area from image</td>
272   </tr>
273
274   <tr>
275     <td><a href="command-line-options.html#features">-features <var>distance</var></a></td>
276     <td>analyze image features (e.g. contract, correlations, etc.).</td>
277   </tr>
278
279   <tr>
280     <td><a href="command-line-options.html#format_identify_">-format <var>string</var></a></td>
281     <td>output formatted image characteristics</td>
282   </tr>
283
284   <tr>
285     <td><a href="command-line-options.html#gamma">-gamma <var>value</var></a></td>
286     <td>level of gamma correction</td>
287   </tr>
288
289   <tr>
290     <td><a href="command-line-options.html#intensity">-grayscale <var>method</var></a></td>
291     <td>convert image to grayscale</td>
292   </tr>
293
294   <tr>
295     <td><a href="command-line-options.html#help">-help</a></td>
296     <td>print program options</td>
297   </tr>
298
299   <tr>
300     <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
301     <td>type of image interlacing scheme</td>
302   </tr>
303
304   <tr>
305     <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
306     <td>pixel color interpolation method</td>
307   </tr>
308
309   <tr>
310     <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
311     <td>pixel cache resource limit</td>
312   </tr>
313
314   <tr>
315     <td><a href="command-line-options.html#list">-list <var>type</var></a></td>
316     <td>Color, Configure, Delegate, Format, Magic, Module, Resource, or Type</td>
317   </tr>
318
319   <tr>
320     <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
321     <td>format of debugging information</td>
322   </tr>
323
324   <tr>
325     <td><a href="command-line-options.html#mask">-mask <var>filename</var></a></td>
326     <td>associate a mask with the image</td>
327   </tr>
328
329   <tr>
330     <td><a href="command-line-options.html#moments">-moments</a></td>
331     <td>display image moments and perceptual hash.</td>
332   </tr>
333
334   <tr>
335     <td><a href="command-line-options.html#monitor">-monitor</a></td>
336     <td>monitor progress</td>
337   </tr>
338
339   <tr>
340     <td><a href="command-line-options.html#negate">-negate</a></td>
341     <td>replace each pixel with its complementary color </td>
342   </tr>
343
344   <tr>
345     <td><a href="command-line-options.html#precision">-precision <var>value</var></a></td>
346     <td>set the maximum number of significant digits to be printed</td>
347   </tr>
348
349   <tr>
350     <td><a href="command-line-options.html#quiet">-quiet</a></td>
351     <td>suppress all warning messages</td>
352   </tr>
353
354   <tr>
355     <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
356     <td>pay attention to warning messages.</td>
357   </tr>
358
359   <tr>
360     <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
361     <td>settings remain in effect until parenthesis boundary.</td>
362   </tr>
363
364   <tr>
365     <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
366     <td>horizontal and vertical sampling factor</td>
367   </tr>
368
369   <tr>
370     <td><a href="command-line-options.html#set">-set <var>attribute value</var></a></td>
371     <td>set an image attribute</td>
372   </tr>
373
374   <tr>
375     <td><a href="command-line-options.html#size">-size <var>geometry</var></a></td>
376     <td>width and height of image</td>
377   </tr>
378
379   <tr>
380     <td><a href="command-line-options.html#strip">-strip</a></td>
381     <td>strip image of all profiles and comments</td>
382   </tr>
383
384   <tr>
385     <td><a href="command-line-options.html#unique">-unique</a></td>
386     <td>display image the number of unique colors in the image.</td>
387   </tr>
388
389   <tr>
390     <td><a href="command-line-options.html#units">-units <var>type</var></a></td>
391     <td>the units of image resolution</td>
392   </tr>
393
394   <tr>
395     <td><a href="command-line-options.html#verbose">-verbose</a></td>
396     <td>print detailed information about the image</td>
397   </tr>
398
399   <tr>
400     <td><a href="command-line-options.html#version">-version</a></td>
401     <td>print version information</td>
402   </tr>
403
404   <tr>
405     <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
406     <td>access method for pixels outside the boundaries of the image</td>
407   </tr>
408
409   </tbody>
410 </table>
411
412 </div>
413   <footer class="magick-footer">
414     <p><a href="support.html">Donate</a> •
415      <a href="sitemap.html">Sitemap</a> •
416     <a href="links.html">Related</a> •
417     <a href="security-policy.html">Security</a> •
418     <a href="architecture.html">Architecture</a>
419 </p>
420     <p><a href="identify.html#">Back to top</a> •
421     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
422     <a href="https://www.imagemagick.org/script/contact.php">Contact Us</a></p>
423         <p><small>© 1999-2017 ImageMagick Studio LLC</small></p>
424   </footer>
425 </div><!-- /.container -->
426
427   <script src="https://localhost/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
428   <script src="../js/magick.html"></script>
429 </div>
430 </body>
431 </html>
432 <!-- Magick Cache 17th May 2017 15:05 -->