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