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,minimum-scale=1,initial-scale=1,shrink-to-fit=no" /> 10 <title>Format and Print Image Properties @ ImageMagick</title> 11 <meta name="application-name" content="ImageMagick" /> 12 <meta name="description" content="Use ImageMagick® to create, edit, compose, or convert bitmap images. You can resize your image, crop it, change its shades and colors, add captions, among other operations." /> 13 <meta name="application-url" content="https://imagemagick.org" /> 14 <meta name="generator" content="PHP" /> 15 <meta name="keywords" content="format, print, image, properties, 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-2019 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="escape.html" rel="canonical" /> 27 <link href="../images/wand.png" rel="icon" /> 28 <link href="../images/wand.ico" rel="shortcut icon" /> 29 <link href="assets/magick.css" rel="stylesheet" /> 30</head> 31<body> 32 <header> 33 <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> 34 <a class="navbar-brand" href="../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a> 35 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation"> 36 <span class="navbar-toggler-icon"></span> 37 </button> 38 39 <div class="navbar-collapse collapse" id="navbarsMagick" style=""> 40 <ul class="navbar-nav mr-auto"> 41 <li class="nav-item "> 42 <a class="nav-link" href="api/quantize.html">Home <span class="sr-only">(current)</span></a> 43 </li> 44 <li class="nav-item "> 45 <a class="nav-link" href="../www/download.html">Download</a> 46 </li> 47 <li class="nav-item "> 48 <a class="nav-link" href="../www/command-line-tools.html">Tools</a> 49 </li> 50 <li class="nav-item "> 51 <a class="nav-link" href="../www/command-line-processing.html">Command-line</a> 52 </li> 53 <li class="nav-item "> 54 <a class="nav-link" href="../www/resources.html">Resources</a> 55 </li> 56 <li class="nav-item "> 57 <a class="nav-link" href="../www/develop.html">Develop</a> 58 </li> 59 <li class="nav-item"> 60 <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a> 61 </li> 62 </ul> 63 <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php"> 64 <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search"> 65 <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button> 66 </form> 67 </div> 68 </nav> 69 <div class="container"> 70 <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" 71 style="display:block" 72 data-ad-client="ca-pub-3129977114552745" 73 data-ad-slot="6345125851" 74 data-ad-format="auto"></ins> 75 <script> 76 (adsbygoogle = window.adsbygoogle || []).push({}); 77 </script> 78 79 </div> 80 </header> 81 <main class="container"> 82 <div class="magick-template"> 83<div class="magick-header"> 84<p class="lead magick-description">There are copious amounts of extra data associated with images (metadata), beyond the actual image pixels. This metadata can be useful, either for display, or for various calculations, or in modifying the behavior of later image processing operations. You can utilize percent escapes in a number of options, for example in <a href="../www/command-line-options.html#format_identify_">-format</a> or in montage <a href="../www/command-line-options.html#label" >-label</a>, to print various properties and other settings associated with an image.</p> 85 86<div class="table-responsive"> 87<table class="table table-striped"> 88<tr> 89 <td><b>Profile Data</b></td> 90 <td>Such as EXIF: data, containing focal lengths, exposures, dates, and in 91 come cases GPS locations. 92 </td></tr> 93<tr> 94 <td><b>Attributes</b></td> 95 <td>These are directly involved with image data, and more commonly 96 modified as part of normal image processing. These include 97 width, height, depth, image type (colorspace), timing delays, and 98 background color. Most specific percent escapes is to access this 99 information. 100 </td></tr> 101<tr> 102 <td><b>Properties</b></td> 103 <td>These are stored as a table of free form strings, and are (if possible) 104 saved with the image (especially in MIFF and PNG image file formats). 105 These include: Labels, Captions, Comments. 106 </td></tr> 107<tr> 108 <td><b>Artifacts</b></td> 109 <td>These are various operational (expert) settings that are saved for 110 use by various operators, or by the user for future use. It is just 111 a table of free-form strings. They are not saved with the image when 112 written. See Artifacts and Options below for details. 113 </td></tr> 114<tr> 115 <td><b>Options</b></td> 116 <td>Also operational (expert) settings that are saved for 117 use by various operators, but are set globally for use by a whole 118 image list (also not saved). See Artifacts and Options below. 119 </td></tr> 120</table></div> 121 122<h3>Percent Escape Handling</h3> 123 124<p>If you request a percent escape such as <code>%[key]</code> the setting 125is looked for in the following order until the first match has been 126found...</p> 127 128<ol> 129<li>Handle special prefixes such as 'artifact:' 'option:' 'exif:', or 130 'fx:'. This includes and calculations and or globs of those prefixes such 131 as 'exif:*' or 'artifact:*' (see below).</li> 132 133<li>If <code>key</code> contains a glob pattern (but no known prefix) 134 search free-form properties table.</li> 135 136<li>If <code>key</code> is a special image 'attribute' name (see list 137 above) return the associated or calculated image attribute.</li> 138 139<li>Search for setting as a free-form 'property'</li> 140<li>Search for setting as a free-form 'artifact'</li> 141<li>Search for setting as a free-form 'option'</li> 142 143<li>Replace escape with empty string, and perhaps produce a warning.</li> 144</ol> 145 146<p>Remember, all long name forms of percent escapes are handled in a is case 147insensitive manner. </p> 148 149<p><b>As of IM v6.8.0-5</b> you can now access the Artifact and Option 150free-form string tables directly, allowing you to override the above sequence, 151and avoid accessing an attribute or property of the same name.</p> 152 153<pre class="highlight"><code>%[artifact:<var>setting</var>] 154%[option:<var>setting</var>] 155</code></pre> 156 157 158<h3>Single Letter Attribute Percent Escapes</h3> 159 160<p>Here are common single letter escapes (short form) is used to report the most 161common attributes and properties of an image, such as: the image filename 162filename, type, width, height. </p> 163 164<div class="table-responsive"> 165<table class="table table-sm table-striped"> 166 <tr> 167 <td>\n</td> 168 <td>newline</td> 169 </tr> 170 <tr> 171 <td>\r</td> 172 <td>carriage return</td> 173 </tr> 174 <tr> 175 <td><</td> 176 <td>less-than character.</td> 177 </tr> 178 <tr> 179 <td>></td> 180 <td>greater-than character.</td> 181 </tr> 182 <tr> 183 <td>&</td> 184 <td>ampersand character.</td> 185 </tr> 186 <tr> 187 <td>%%</td> 188 <td>a percent sign</td> 189 </tr> 190 <tr> 191 <td>%b</td> 192 <td>file size of image read in (use <a href="escape.html#precision">-precision</a> 16 to force results in B)</td> 193 </tr> 194 <tr> 195 <td>%c</td> 196 <td>comment meta-data property</td> 197 </tr> 198 <tr> 199 <td>%d</td> 200 <td>directory component of path</td> 201 </tr> 202 <tr> 203 <td>%e</td> 204 <td>filename extension or suffix</td> 205 </tr> 206 <tr> 207 <td>%f</td> 208 <td>filename (including suffix)</td> 209 </tr> 210 <tr> 211 <td>%g</td> 212 <td>layer canvas page geometry (equivalent to "%Wx%H%X%Y")</td> 213 </tr> 214 <tr> 215 <td>%h</td> 216 <td>current image height in pixels</td> 217 </tr> 218 <tr> 219 <td>%i</td> 220 <td>image filename (note: becomes output filename for "info:")</td> 221 </tr> 222 <tr> 223 <td>%k</td> 224 <td>CALCULATED: number of unique colors</td> 225 </tr> 226 <tr> 227 <td>%l</td> 228 <td>label meta-data property</td> 229 </tr> 230 <tr> 231 <td>%m</td> 232 <td>image file format (file magic)</td> 233 </tr> 234 <tr> 235 <td>%n</td> 236 <td>number of images in current image sequence</td> 237 </tr> 238 <tr> 239 <td>%o</td> 240 <td>output filename (used for delegates)</td> 241 </tr> 242 <tr> 243 <td>%p</td> 244 <td>index of image in current image list</td> 245 </tr> 246 <tr> 247 <td>%q</td> 248 <td>quantum depth (compile-time constant)</td> 249 </tr> 250 <tr> 251 <td>%r</td> 252 <td>image class and colorspace</td> 253 </tr> 254 <tr> 255 <td>%s</td> 256 <td>scene number (from input unless re-assigned)</td> 257 </tr> 258 <tr> 259 <td>%t</td> 260 <td>filename without directory or extension (suffix)</td> 261 </tr> 262 <tr> 263 <td>%u</td> 264 <td>unique temporary filename (used for delegates)</td> 265 </tr> 266 <tr> 267 <td>%w</td> 268 <td>current width in pixels</td> 269 </tr> 270 <tr> 271 <td>%x</td> 272 <td>x resolution (density)</td> 273 </tr> 274 <tr> 275 <td>%y</td> 276 <td>y resolution (density)</td> 277 </tr> 278 <tr> 279 <td>%z</td> 280 <td>image depth (as read in unless modified, image save depth)</td> 281 </tr> 282 <tr> 283 <td>%A</td> 284 <td>image transparency channel enabled (true/false)</td> 285 </tr> 286 <tr> 287 <td>%B</td> 288 <td>file size of image read in bytes</td> 289 </tr> 290 <tr> 291 <td>%C</td> 292 <td>image compression type</td> 293 </tr> 294 <tr> 295 <td>%D</td> 296 <td>image GIF dispose method</td> 297 </tr> 298 <tr> 299 <td>%G</td> 300 <td>original image size (%wx%h; before any resizes)</td> 301 </tr> 302 <tr> 303 <td>%H</td> 304 <td>page (canvas) height</td> 305 </tr> 306 <tr> 307 <td>%M</td> 308 <td>Magick filename (original file exactly as given, including read mods)</td> 309 </tr> 310 <tr> 311 <td>%O</td> 312 <td>page (canvas) offset ( = %X%Y )</td> 313 </tr> 314 <tr> 315 <td>%P</td> 316 <td>page (canvas) size ( = %Wx%H )</td> 317 </tr> 318 <tr> 319 <td>%Q</td> 320 <td>image compression quality ( 0 = default )</td> 321 </tr> 322 <tr> 323 <td>%S</td> 324 <td>?? scenes ??</td> 325 </tr> 326 <tr> 327 <td>%T</td> 328 <td>image time delay (in centi-seconds)</td> 329 </tr> 330 <tr> 331 <td>%U</td> 332 <td>image resolution units</td> 333 </tr> 334 <tr> 335 <td>%W</td> 336 <td>page (canvas) width</td> 337 </tr> 338 <tr> 339 <td>%X</td> 340 <td>page (canvas) x offset (including sign)</td> 341 </tr> 342 <tr> 343 <td>%Y</td> 344 <td>page (canvas) y offset (including sign)</td> 345 </tr> 346 <tr> 347 <td>%Z</td> 348 <td>unique filename (used for delegates)</td> 349 </tr> 350 <tr> 351 <td>%@</td> 352 <td>CALCULATED: trim bounding box (without actually trimming)</td> 353 </tr> 354 <tr> 355 <td>%#</td> 356 <td>CALCULATED: 'signature' hash of image values</td> 357 </tr> 358</table></div> 359 360<p>Here is a sample command and its output for an image with filename 361<code>bird.miff</code> and whose width is 512 and height is 480.</p> 362 363<pre class="highlight"><code>-> identify -format "%m:%f %wx%h" bird.miff 364MIFF:bird.miff 512x480 365</code></pre> 366 367<p>Note that all single letter percent escapes can also be used using long 368form (from IM version 6.7.6-9, see next). For example <code>%[f]</code> is 369equivalent to the <code>%f</code> short form. </p> 370 371<p><b>WARNING</b>: short form percent escapes are NOT performed when the percent 372is after a number. For example, <code>10%x10</code> does not expand the 373<code>%x</code> as a percent escape. If you specifically want to expand the 374'x', use the long form which overrides this special case. EG: 375<code>10%[x]10</code>. </p> 376 377<p>Also be warned that calculated attributes can take some time to generate, 378especially for large images.</p> 379 380<h3>Long Form Attribute Percent Escapes</h3> 381 382<p>In addition to the above specific and calculated attributes are recognized 383when enclosed in braces (long form):</p> 384 385<div class="table-responsive"> 386<table class="table table-sm table-striped"> 387 <tr> 388 <td>%[basename]</td> 389 <td>base filename, no suffixes (as %t)</td> 390 </tr> 391 <tr> 392 <td>%[bit-depth]</td> 393 <td>Actual bit-depth of the pixel data</td> 394 </tr> 395 <tr> 396 <td>%[caption]</td> 397 <td>caption meta-data property</td> 398 </tr> 399 <tr> 400 <td>%[caption:pointsize]</td> 401 <td>returns the pointsize computed during caption: processing (as of IM 6.9.1-0)</td> 402 </tr> 403 <tr> 404 <td>%[channels]</td> 405 <td>??? channels in use - colorspace ???</td> 406 </tr> 407 <tr> 408 <td>%[colors]</td> 409 <td>Number of unique colors in the image (as of IM 7.0.3.8)</td> 410 </tr> 411 <tr> 412 <td>%[colorspace]</td> 413 <td>colorspace of Image Data (excluding transparency)</td> 414 </tr> 415 <tr> 416 <td>%[compose]</td> 417 <td> </td> 418 </tr> 419 <tr> 420 <td>%[compression]</td> 421 <td>image compression type (as of IM 6.9.6-6)</td> 422 </tr> 423 <tr> 424 <td>%[copyright]</td> 425 <td>ImageMagick Copyright String</td> 426 </tr> 427 <tr> 428 <td>%[depth]</td> 429 <td>depth of image for write (as input unless changed)</td> 430 </tr> 431 <tr> 432 <td>%[deskew:angle]</td> 433 <td>The deskew angle in degrees of rotation</td> 434 </tr> 435 <tr> 436 <td>%[directory]</td> 437 <td>directory part of filename (as %d)</td> 438 </tr> 439 <tr> 440 <td>%[distortion]</td> 441 <td>how well an image resembles a reference image (<a href="../www/command-line-options.html#compare" >-compare</a>)</td> 442 </tr> 443 <tr> 444 <td>%[entropy]</td> 445 <td>CALCULATED: entropy of the image</td> 446 </tr> 447 <tr> 448 <td>%[extension]</td> 449 <td>extension part of filename (as %e)</td> 450 </tr> 451 <tr> 452 <td>%[gamma]</td> 453 <td>value of image gamma</td> 454 </tr> 455 <tr> 456 <td>%[group]</td> 457 <td>??? window group ???</td> 458 </tr> 459 <tr> 460 <td>%[height]</td> 461 <td>original height of image (when it was read in)</td> 462 </tr> 463 <tr> 464 <td>%[input]</td> 465 <td> </td> 466 </tr> 467 <tr> 468 <td>%[interlace]</td> 469 <td>Image interlace mode (as of IM 7.0.3.8)</td> 470 </tr> 471 <tr> 472 <td>%[kurtosis]</td> 473 <td>CALCULATED: kurtosis statistic of image</td> 474 </tr> 475 <tr> 476 <td>%[label]</td> 477 <td>label meta-data property</td> 478 </tr> 479 <tr> 480 <td>%[label:pointsize]</td> 481 <td>returns the pointsize computed during label: processing (as of IM 6.9.1-0)</td> 482 </tr> 483 <tr> 484 <td>%[magick]</td> 485 <td>coder used to read image (not the file suffix)</td> 486 </tr> 487 <tr> 488 <td>%[max]</td> 489 <td>CALCULATED: maximum value statistic of image</td> 490 </tr> 491 <tr> 492 <td>%[mean]</td> 493 <td>CALCULATED: average value statistic of image</td> 494 </tr> 495 <tr> 496 <td>%[min]</td> 497 <td>CALCULATED: minimum value statistic of image</td> 498 </tr> 499 <tr> 500 <td>%[opaque]</td> 501 <td>CALCULATED: is image fully-opaque?</td> 502 </tr> 503 <tr> 504 <td>%[orientation]</td> 505 <td>image orientation</td> 506 </tr> 507 <tr> 508 <td>%[page]</td> 509 <td>Virtual canvas (page) geometry</td> 510 </tr> 511 <tr> 512 <td>%[printsize.x]</td> 513 <td>X printsize</td> 514 </tr> 515 <tr> 516 <td>%[printsize.y]</td> 517 <td>Y printsize</td> 518 </tr> 519 <tr> 520 <td>%[profile:icc]</td> 521 <td>ICC profile info</td> 522 </tr> 523 <tr> 524 <td>%[profile:icm]</td> 525 <td>ICM profile info</td> 526 </tr> 527 <tr> 528 <td>%[profiles]</td> 529 <td>list of any embedded profiles</td> 530 </tr> 531 <tr> 532 <td>%[quality]</td> 533 <td>Image quality value (as of IM 7.0.3.8)</td> 534 </tr> 535 <tr> 536 <td>%[rendering-intent]</td> 537 <td>Image rendering intent (as of IM 7.0.3.8)</td> 538 </tr> 539 <tr> 540 <td>%[resolution.x]</td> 541 <td>X density (resolution) without units</td> 542 </tr> 543 <tr> 544 <td>%[resolution.y]</td> 545 <td>Y density (resolution) without units</td> 546 </tr> 547 <tr> 548 <td>%[scene]</td> 549 <td>original scene number of image in input file</td> 550 </tr> 551 <tr> 552 <td>%[size]</td> 553 <td>original size of image (when it was read in)</td> 554 </tr> 555 <tr> 556 <td>%[skewness]</td> 557 <td>CALCULATED: skewness statistic of image</td> 558 </tr> 559 <tr> 560 <td>%[standard-deviation]</td> 561 <td>CALCULATED: standard deviation statistic of image</td> 562 </tr> 563 <tr> 564 <td>%[type]</td> 565 <td>CALCULATED: image type</td> 566 </tr> 567 <tr> 568 <td>%[unique]</td> 569 <td>unique temporary filename ???</td> 570 </tr> 571 <tr> 572 <td>%[units]</td> 573 <td>image resolution units</td> 574 </tr> 575 <tr> 576 <td>%[version]</td> 577 <td>Version Information of this running ImageMagick</td> 578 </tr> 579 <tr> 580 <td>%[width]</td> 581 <td>original width of image (when it was read in)</td> 582 </tr> 583 <tr> 584 <td>%[zero]</td> 585 <td>zero (unique filename for delegate use)</td> 586 </tr> 587</table></div> 588 589<h3>Properties</h3> 590 591<p>All other long forms of percent escapes (not single letter long form) are 592handled in a case insensitive manner. Such escapes will will attempt to look 593up that name specific data sources. </p> 594 595<p>The primary search space (if not a specific attribute listed above) is 596a free-form property string. Such strings are associated and saved with 597images, and are typically set using either the <a href="../www/command-line-options.html#set" >-set</a> 598CLI option (or API equivalent), or from special convenience options 599(such as <a href="../www/command-line-options.html#label" 600>-label</a>, <a href="../www/command-line-options.html#comment" 601>-comment</a>, <a href="../www/command-line-options.html#caption" 602>-caption</a>). </p> 603 604<p>These convenience options are globally saved (as 'global options' so thay can 605be set before images are read), and later are transfered to the property of 606individual images, only when they are read in. At that time any internal 607percent escape present is then handled. </p> 608 609<p>To change a property of an image already in memory, you need to use <a 610href="../www/command-line-options.html#set" >-set</a>. 611</p> 612 613<p>Note that properties, like attributes (and profiles), are saved with 614images when write, if the image file format allows. </p> 615 616 617<h3>Artifacts and Options</h3> 618 619<p>The previous percent escapes are associated with the primary Attributes and 620Properties. Which is the original and primary focus of such percent escapes. 621</p> 622 623<p>However there are many operational settings that are used by various 624ImageMagick operators that can be useful to set and later access. These 625consist of per-image Artifacts, and Global options (associated with a list of 626images, typically the current image list).</p> 627 628<p>Note that the major difference between an artifact and a property is that 629artifacts, being an internal operational setting, is not saved with images (if 630such is possible). </p> 631 632<p>For example when you use <code>-define 'distort:viewport=100x100'</code> you 633are in fact generating a global option, which the <a href="../www/command-line-options.html#distort" 634>-distort</a> operator will use to modify its behavior (distorted output 635image 'view'). </p> 636 637<p>An Option is essentually a Artifact that has been stored globally as part 638of a list of images (specifically a 'Wand' of images). As such they are 639identical, in that a Option, is simply a global Artifact for all the 640associated images. </p> 641 642<p>As such you can use <code>-set 'option:distort:viewport' '100x100'</code> to 643achieve the same result of setting a Artifact for the disort operation to use. 644</p> 645 646<p><b>Internal Handling of a Global Option...</b></p> 647 648<p>The Core library ('MagickCore') does not generally directly understand 649Global Options. As such, continuing the previous example, the 650<code>DistortImages()</code> function only looks up an artifact to discover if 651a 'viewport' has been provided to it. </p> 652 653<p>How Global Options are used when a library function requests an Artifact is 654one of the key differences between IMv6 and IMv7.</p> 655 656<p>In <b>ImageMagick version 6</b>... before each operator, any global Options 657are copied to per-image Artifacts, for every image in the current image list. 658This allows various operators to find its operational 'defines' or Artifacts. 659</p> 660 661<p>In <b>ImageMagick version 7</b>... sets a link back to the global options 662data, so that if a specific per-image Artifact is not found , then it will 663look for a equivalent global Option for that image list. directly. This 664saves coping these free-form options into artifacts repeatally, and means you 665can now separately define a global option for a list, and a individual 666overriding artifact for a specific image in that list. </p> 667 668<p>Note that many API's that do not use Wands (PerlMagick for example using 669arrays of images rather than a Wand). In these API's you will not have Global 670Options, only per-image Artifacts. </p> 671 672<p>In summery a Global Option, if available, is equivalent to a per-image 673Artifact. </p> 674 675 676<h3>Glob-Pattern Listing of Properties, Artifacts and Options</h3> 677 678<p>The <var>setting</var> can contain a glob pattern. As such you can 679now list all free-form string properties, artifacts, and options, (but not 680specific image attributes) using...</p> 681 682<pre class="highlight"><code>convert ... \ 683 -print "__Properties__\n%[*]" \ 684 -print "__Artifacts__\n%[artifact:*]" \ 685 -print "__Options__\n%[option:*]" \ 686 ... 687</code></pre> 688 689<p> The format of glob patterns are very specific and as such is generally 690only used to list specific settings, such as when debugging, rather than being 691used for image processing use. </p> 692 693 694<h3>Calculated Percent Escape Prefixes</h3> 695 696<p>There are some special prefixes (before the first ':') which performs 697calculations based on the user provided string that follows that prefix. For 698example you can do a numerical calculation use <code>%[fx:...]</code> to 699evaluate the given <a href="fx.html">FX</a> expressions:</p> 700 701<pre class="highlight"><code>%[fx:<var>expression</var>] 702</code></pre> 703 704<p>Use <code>pixel:</code> or <code>hex:</code> to evaluate a pixel color as defined by the <a 705href="fx.html">FX</a> 706expression:</p> 707 708<pre class="highlight"><code>%[pixel:<var>expression</var>] 709</code></pre> 710 711<h3>Specific Profile Percent Escape Prefixes</h3> 712 713<p>You can also use the following special formatting syntax to print EXIF 714mage meta-data that was included in the image read in:</p> 715 716<pre class="highlight"><code>%[EXIF:<var>tag</var>] 717</code></pre> 718 719<p>Choose <var>tag</var> from the following:</p> 720 721<pre class="pre-scrollable"><code> 722* (print all EXIF tags, in keyword=data format) 723! (print all EXIF tags, in tag_number data format) 724#hhhh (print data for EXIF tag #hhhh) 725ImageWidth 726ImageLength 727BitsPerSample 728Compression 729PhotometricInterpretation 730FillOrder 731DocumentName 732ImageDescription 733Make 734Model 735StripOffsets 736Orientation 737SamplesPerPixel 738RowsPerStrip 739StripByteCounts 740XResolution 741YResolution 742PlanarConfiguration 743ResolutionUnit 744TransferFunction 745Software 746DateTime 747Artist 748WhitePoint 749PrimaryChromaticities 750TransferRange 751JPEGProc 752JPEGInterchangeFormat 753JPEGInterchangeFormatLength 754YCbCrCoefficients 755YCbCrSubSampling 756YCbCrPositioning 757ReferenceBlackWhite 758CFARepeatPatternDim 759CFAPattern 760BatteryLevel 761Copyright 762ExposureTime 763FNumber 764IPTC/NAA 765EXIFOffset 766InterColorProfile 767ExposureProgram 768SpectralSensitivity 769GPSInfo 770ISOSpeedRatings 771OECF 772EXIFVersion 773DateTimeOriginal 774DateTimeDigitized 775ComponentsConfiguration 776CompressedBitsPerPixel 777ShutterSpeedValue 778ApertureValue 779BrightnessValue 780ExposureBiasValue 781MaxApertureValue 782SubjectDistance 783MeteringMode 784LightSource 785Flash 786FocalLength 787MakerNote 788UserComment 789SubSecTime 790SubSecTimeOriginal 791SubSecTimeDigitized 792FlashPixVersion 793ColorSpace 794EXIFImageWidth 795EXIFImageLength 796InteroperabilityOffset 797FlashEnergy 798SpatialFrequencyResponse 799FocalPlaneXResolution 800FocalPlaneYResolution 801FocalPlaneResolutionUnit 802SubjectLocation 803ExposureIndex 804SensingMethod 805FileSource 806SceneType 807</code></pre> 808<br/> 809<p>Surround the format specification with quotation marks to prevent your 810shell from misinterpreting any spaces and square brackets.</p> 811 812<p>The following special formatting syntax can be used to print IPTC 813information contained in the file:</p> 814 815<pre class="highlight"><code>%[IPTC:<var>dataset</var>:<var>record</var>] 816</code></pre> 817 818<p>Select <var>dataset</var> and <var>record</var> from the following:</p> 819 820<pre class="pre-scrollable:"> 821 Envelope Record 822 1:00 Model Version 823 1:05 Destination 824 1:20 File Format 825 1:22 File Format Version 826 1:30 Service Identifier 827 1:40 Envelope Number 828 1:50 Product ID 829 1:60 Envelope Priority 830 1:70 Date Sent 831 1:80 Time Sent 832 1:90 Coded Character Set 833 1:100 UNO (Unique Name of Object) 834 1:120 ARM Identifier 835 1:122 ARM Version 836 837Application Record 838 2:00 Record Version 839 2:03 Object Type Reference 840 2:05 Object Name (Title) 841 2:07 Edit Status 842 2:08 Editorial Update 843 2:10 Urgency 844 2:12 Subject Reference 845 2:15 Category 846 2:20 Supplemental Category 847 2:22 Fixture Identifier 848 2:25 Keywords 849 2:26 Content Location Code 850 2:27 Content Location Name 851 2:30 Release Date 852 2:35 Release Time 853 2:37 Expiration Date 854 2:38 Expiration Time 855 2:40 Special Instructions 856 2:42 Action Advised 857 2:45 Reference Service 858 2:47 Reference Date 859 2:50 Reference Number 860 2:55 Date Created 861 2:60 Time Created 862 2:62 Digital Creation Date 863 2:63 Digital Creation Time 864 2:65 Originating Program 865 2:70 Program Version 866 2:75 Object Cycle 867 2:80 By-Line (Author) 868 2:85 By-Line Title (Author Position) [Not used in Photoshop 7] 869 2:90 City 870 2:92 Sub-Location 871 2:95 Province/State 872 2:100 Country/Primary Location Code 873 2:101 Country/Primary Location Name 874 2:103 Original Transmission Reference 875 2:105 Headline 876 2:110 Credit 877 2:115 Source 878 2:116 Copyright Notice 879 2:118 Contact 880 2:120 Caption/Abstract 881 2:122 Caption Writer/Editor 882 2:125 Rasterized Caption 883 2:130 Image Type 884 2:131 Image Orientation 885 2:135 Language Identifier 886 2:150 Audio Type 887 2:151 Audio Sampling Rate 888 2:152 Audio Sampling Resolution 889 2:153 Audio Duration 890 2:154 Audio Outcue 891 2:200 ObjectData Preview File Format 892 2:201 ObjectData Preview File Format Version 893 2:202 ObjectData Preview Data 894 895Pre-ObjectData Descriptor Record 896 7:10 Size Mode 897 7:20 Max Subfile Size 898 7:90 ObjectData Size Announced 899 7:95 Maximum ObjectData Size 900 901ObjectData Record 902 8:10 Subfile 903 904Post ObjectData Descriptor Record 905 9:10 Confirmed ObjectData Size 906</code></pre> 907</div> 908 </div> 909 </main><!-- /.container --> 910 <footer class="magick-footer"> 911 <p><a href="../www/security-policy.html">Security</a> • 912 <a href="../www/architecture.html">Architecture</a> • 913 <a href="../www/links.html">Related</a> • 914 <a href="../www/sitemap.html">Sitemap</a> 915 916 <a href="escape.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico"/></a> 917 918 <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> • 919 <a href="../www/support.html">Donate</a> • 920 <a href="../www/https://imagemagick.org/script/contact.php">Contact Us</a> 921 <br/> 922 <small>© 1999-2019 ImageMagick Studio LLC</small></p> 923 </footer> 924 925 <!-- Javascript assets --> 926 <script src="assets/magick.js" crossorigin="anonymous"></script> 927 <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script> 928</body> 929</html> 930