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