Debian Codegraph @

www/escape/index.html

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1
2
3 <!DOCTYPE html>
4 <html lang="en" data-bs-theme="dark">
5
6
7 <head>
8 <meta charset="utf-8">
9 <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
10 <title>ImageMagick | Format and Print Image Properties</title>
11 <meta name="description" content="">
12 <link rel="canonical" href="index.html">
13 <meta name="robots" content="index, follow">
14 <meta name="theme-color" content="#000000">
15 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4">
16 <link rel="shortcut icon" href="../image/wand.png" type="image/png">
17 <link rel="apple-touch-icon" href="../image/wand.png" type="image/png">
18 <link rel="preconnect" href="https://localhost/">
19 <link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" as="style" crossorigin="anonymous">
20 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">
21 <!-- Accessibility Enhancement -->
22 <style>
23 html {
24 scroll-padding-top: 70px;
25 }
26
27 a.nav-link:hover,
28 a.dropdown-item:hover {
29 color: #ffc107 !important;
30 text-shadow: 0px 2px 4px rgba(255, 193, 7, 0.8);
31 }
32
33 .btn-outline-warning {
34 color: #cd7f32;
35 border-color: #cd7f32;
36 }
37
38 .navbar-brand {
39 color: #d4af37;
40 transition: color 0.3s ease, text-shadow 0.3s ease;
41 }
42
43 .navbar-brand:hover {
44 color: #e9c03d;
45 text-shadow: 0px 2px 4px rgba(203, 163, 120, 0.6);
46 }
47
48 :root {
49 --bs-code-color: revert;
50 }
51 </style>
52 <!-- Open Graph Meta Tags -->
53 <meta property="og:title" content="ImageMagick | Format and Print Image Properties">
54 <meta property="og:description" content="">
55 <meta property="og:image" content="https://imagemagick.org/image/logo.png">
56 <meta property="og:logo" content="https://imagemagick.org/image/logo.png">
57 <meta property="og:url" content="https://imagemagick.org/escape/">
58 <meta property="og:type" content="website">
59 <meta property="og:site_name" content="ImageMagick">
60 <meta property="og:locale" content="en_us">
61 <!-- Twitter Card Meta Tags -->
62 <meta name="twitter:card" content="summary_large_image">
63 $site=strtolower("ImageMagick");
64 <meta name="twitter:site" content="@imagemagick">
65 <meta name="twitter:creator" content="@imagemagick">
66 <meta name="twitter:title" content="ImageMagick | Format and Print Image Properties">
67 <meta name="twitter:description" content="$this->description">
68 <meta name="twitter:image" content="https://imagemagick.org/image/logo.png">
69 <meta name="twitter:image:alt" content="ImageMagick logo and tag line">
70 <!-- JSON-LD Structured Data -->
71 <script type="application/ld+json">
72 {
73 "@context": "https://schema.org",
74 "@type": "SoftwareApplication",
75 "name": "ImageMagick",
76 "url": "ImageMagick | Format and Print Image Properties",
77 "image": "https://imagemagick.org/image/logo.png",
78 "description": "$this->description",
79 "applicationCategory": "Multimedia",
80 "operatingSystem": "Windows, macOS, Linux, Unix",
81 "softwareVersion": "7.1.2-27",
82 "license": "https://imagemagick.org/license/",
83 "creator": {
84 "@type": "Organization",
85 "name": "ImageMagick Studio LLC",
86 "url": "https://imagemagick.org"
87 },
88 "keywords": [
89 "".ucfirst($title)."",
90 "image processing software",
91 "image conversion tool",
92 "batch image editing",
93 "open-source image editor",
94 "ImageMagick command-line",
95 "resize images ImageMagick",
96 "crop and rotate images",
97 "ImageMagick tutorial",
98 "ImageMagick automation",
99 "ImageMagick for developers",
100 "ImageMagick CLI",
101 "ImageMagick filters and effects",
102 "ImageMagick scripting",
103 "ImageMagick API integration"
104 ],
105 "sameAs": [
106 "https://github.com/ImageMagick",
107 "https://x.com/imagemagick"
108 ],
109 "offers": {
110 "@type": "Offer",
111 "price": "0.00",
112 "priceCurrency": "USD"
113 }
114 }
115 </script>
116 <!-- Google Custom Search -->
117 <script async src="https://localhost/cse.js?cx=8720b81722164487b"></script>
118 <script async src="https://localhost/pagead/js/adsbygoogle.js?client=ca-pub-3129977114552745" crossorigin="anonymous"></script>
119 </head>
120
121 <body>
122 <script>
123 function setTheme(theme) {
124 localStorage.setItem('theme', theme);
125 updateThemeIcon(theme);
126 document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? getSystemTheme() : theme);
127 }
128 function getSystemTheme() {
129 return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
130 }
131 function updateThemeIcon(theme) {
132 const iconMap = {
133 light: '☀️',
134 dark: '🌙',
135 auto: '🌓'
136 };
137 document.getElementById('currentThemeIcon').textContent = iconMap[theme] || '🌓';
138 }
139 document.addEventListener('DOMContentLoaded', () => {
140 const savedTheme = localStorage.getItem('theme') || 'auto';
141 setTheme(savedTheme);
142 });
143 </script>
144 <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
145 <div class="container-fluid">
146 <a class="navbar-brand fw-bold" href="../index-2.html" title="ImageMagick">ImageMagick</a>
147 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#magick-navbars" aria-controls="magick-navbars" aria-expanded="false" aria-label="Toggle navigation">
148 <span class="navbar-toggler-icon"></span>
149 </button>
150
151 <div class="collapse navbar-collapse" id="magick-navbars">
152 <ul class="navbar-nav me-auto">
153 <li class="nav-item">
154 <a class="nav-link "" href="../download/index.html">Download</a>
155 </li>
156 <li class="nav-item">
157 <a class="nav-link "" href="../command-line-tools/index.html">Tools</a>
158 </li>
159 <li class="nav-item">
160 <a class="nav-link "" href="../command-line-processing/index.html">CLI</a>
161 </li>
162 <li class="nav-item">
163 <a class="nav-link "" href="../develop/index.html">Develop</a>
164 </li>
165 <li class="nav-item">
166 <a class="nav-link" rel="noopener noreferrer" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
167 </li>
168 </ul>
169 <ul class="navbar-nav ms-auto">
170 <li class="nav-item ms-3">
171 <form class="d-flex form-inline" action="https://imagemagick.org/escape/">
172 <input class="form-control me-2" type="text" name="q" placeholder="Search site..." aria-label="Search">
173 <button class="btn btn-outline-warning" type="submit" name="sa">Search</button>
174 </form>
175 </li>
176 <li class="nav-item dropdown ms-3">
177 <a class="nav-link dropdown-toggle" href="#" id="themeDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
178 <span id="currentThemeIcon">🌓</span>
179 </a>
180 <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="themeDropdown">
181 <li><a class="dropdown-item" href="#" onclick="setTheme('light')">☀️ Light</a></li>
182 <li><a class="dropdown-item" href="#" onclick="setTheme('dark')">🌙 Dark</a></li>
183 <li><a class="dropdown-item" href="#" onclick="setTheme('auto')">🌓 Auto</a></li>
184 </ul>
185 </li>
186 </ul>
187 </div>
188 </div>
189 </nav>
190
191 <div class="col-lg-8 mx-auto text-body-secondary pt-5 pt-lg-5">
192 <header class="d-flex align-items-center pb-3 mb-5 border-bottom">
193 <div class="mt-3 ms-3">
194 <a href="../index-2.html" class="text-decoration-none">
195 <h1 class="fs-2 mb-1 display-5">Format and Print Image Properties</h1>
196 </a>
197 <h2 class="fs-5 text-muted h4">ImageMagick</h2>
198 </div>
199 </header>
200
201 <main role="main" class="container">
202 <div class="row g-5">
203 <div class="col-md-9">
204 <div>
205 <p class="lead">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="../command-line-options/index.html#format_identify_">-format</a> or in montage <a href="../command-line-options/index.html#label" >-label</a>, to print various properties and other settings associated with an image.</p>
206
207 <div>
208 <table class="table table-hover table-striped">
209 <tr>
210 <td><b>Profile Data</b></td>
211 <td>Such as EXIF: data, containing focal lengths, exposures, dates, and in
212 some cases GPS locations.
213 </td></tr>
214 <tr>
215 <td><b>Attributes</b></td>
216 <td>These are directly involved with image data, and more commonly
217 modified as part of normal image processing. These include
218 width, height, depth, image type (colorspace), timing delays, and
219 background color. Most specific percent escapes is to access this
220 information.
221 </td></tr>
222 <tr>
223 <td><b>Properties</b></td>
224 <td>These are stored as a table of free form strings, and are (if possible)
225 saved with the image (especially in MIFF and PNG image file formats).
226 These include: Labels, Captions, Comments.
227 </td></tr>
228 <tr>
229 <td><b>Artifacts</b></td>
230 <td>These are various operational (expert) settings that are saved for
231 use by various operators, or by the user for future use. It is just
232 a table of free-form strings. They are not saved with the image when
233 written. See Artifacts and Options below for details.
234 </td></tr>
235 <tr>
236 <td><b>Options</b></td>
237 <td>Also operational (expert) settings that are saved for
238 use by various operators, but are set globally for use by a whole
239 image list (also not saved). See Artifacts and Options below.
240 </td></tr>
241 </table></div>
242
243 <h2>Percent Escape Handling</h2>
244
245 <p>If you request a percent escape such as <code>%[key]</code> the setting
246 is looked for in the following order until the first match has been
247 found...</p>
248
249 <ol>
250 <li>Handle special prefixes such as 'artifact:' 'option:' 'exif:', or
251 'fx:'. This includes and calculations and or globs of those prefixes such
252 as 'exif:*' or 'artifact:*' (see below).</li>
253
254 <li>If <code>key</code> contains a glob pattern (but no known prefix)
255 search free-form properties table.</li>
256
257 <li>If <code>key</code> is a special image 'attribute' name (see list
258 above) return the associated or calculated image attribute.</li>
259
260 <li>Search for setting as a free-form 'property'</li>
261 <li>Search for setting as a free-form 'artifact'</li>
262 <li>Search for setting as a free-form 'option'</li>
263
264 <li>Replace escape with empty string, and perhaps produce a warning.</li>
265 </ol>
266
267 <p>Remember, all long name forms of percent escapes are handled in a is case
268 insensitive manner. </p>
269
270 <p>You can now access the Artifact and Option
271 free-form string tables directly, allowing you to override the above sequence,
272 and avoid accessing an attribute or property of the same name.</p>
273
274 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>%[artifact:<var>setting</var>]
275 %[option:<var>setting</var>] </code></pre>
276
277 <p>Escape handling requires access to an image container. If none are available, a blank image is created to ensure the expression can be processed and a value returned. For example, <pre><samp>$ magick -print "%[fx:.8765/3.14]" null: null:</samp></pre>.</p>
278
279 <h2>Single Letter Attribute Percent Escapes</h2>
280
281 <p>Here are common single letter escapes (short form) is used to report the most
282 common attributes and properties of an image, such as: the image filename
283 filename, type, width, height. </p>
284
285 <div>
286 <table class="table table-sm table-hover table-striped table-responsive">
287 <tr>
288 <td>\</td>
289 <td>backslash, the next character is literal and not subject to interpretation</td>
290 </tr>
291 <tr>
292 <td>\n</td>
293 <td>newline</td>
294 </tr>
295 <tr>
296 <td>\r</td>
297 <td>carriage return</td>
298 </tr>
299 <tr>
300 <td>&lt;</td>
301 <td>less-than character.</td>
302 </tr>
303 <tr>
304 <td>&gt;</td>
305 <td>greater-than character.</td>
306 </tr>
307 <tr>
308 <td>&amp;</td>
309 <td>ampersand character.</td>
310 </tr>
311 <tr>
312 <td>%%</td>
313 <td>a percent sign</td>
314 </tr>
315 <tr>
316 <td>%b</td>
317 <td>file size of image read in (use <a href="#precision">-precision</a> 16 to force results in B)</td>
318 </tr>
319 <tr>
320 <td>%c</td>
321 <td>comment meta-data property</td>
322 </tr>
323 <tr>
324 <td>%d</td>
325 <td>directory component of path</td>
326 </tr>
327 <tr>
328 <td>%e</td>
329 <td>filename extension or suffix</td>
330 </tr>
331 <tr>
332 <td>%f</td>
333 <td>filename (including suffix)</td>
334 </tr>
335 <tr>
336 <td>%g</td>
337 <td>layer canvas page geometry (equivalent to "%Wx%H%X%Y")</td>
338 </tr>
339 <tr>
340 <td>%h</td>
341 <td>current image height in pixels</td>
342 </tr>
343 <tr>
344 <td>%i</td>
345 <td>image filename (note: becomes output filename for "info:")</td>
346 </tr>
347 <tr>
348 <td>%k</td>
349 <td>CALCULATED: number of unique colors</td>
350 </tr>
351 <tr>
352 <td>%l</td>
353 <td>label meta-data property</td>
354 </tr>
355 <tr>
356 <td>%m</td>
357 <td>image file format (file magic)</td>
358 </tr>
359 <tr>
360 <td>%n</td>
361 <td>number of images in current image sequence, report once per frame</td>
362 </tr>
363 <tr>
364 <td>%o</td>
365 <td>output filename (used for delegates)</td>
366 </tr>
367 <tr>
368 <td>%p</td>
369 <td>index of image in current image list</td>
370 </tr>
371 <tr>
372 <td>%q</td>
373 <td>quantum depth (compile-time constant)</td>
374 </tr>
375 <tr>
376 <td>%r</td>
377 <td>image class and colorspace</td>
378 </tr>
379 <tr>
380 <td>%s</td>
381 <td>scene number (from input unless re-assigned)</td>
382 </tr>
383 <tr>
384 <td>%t</td>
385 <td>filename without directory or extension (suffix)</td>
386 </tr>
387 <tr>
388 <td>%u</td>
389 <td>unique temporary filename (used for delegates)</td>
390 </tr>
391 <tr>
392 <td>%w</td>
393 <td>current width in pixels</td>
394 </tr>
395 <tr>
396 <td>%x</td>
397 <td>x resolution (density)</td>
398 </tr>
399 <tr>
400 <td>%y</td>
401 <td>y resolution (density)</td>
402 </tr>
403 <tr>
404 <td>%z</td>
405 <td>image depth (as read in unless modified, image save depth)</td>
406 </tr>
407 <tr>
408 <td>%A</td>
409 <td>image transparency channel. Values include Undefined (no transparency channel), Blend, Copy, or Update. </td>
410 </tr>
411 <tr>
412 <td>%B</td>
413 <td>file size of image read in bytes</td>
414 </tr>
415 <tr>
416 <td>%C</td>
417 <td>image compression type</td>
418 </tr>
419 <tr>
420 <td>%D</td>
421 <td>image GIF dispose method</td>
422 </tr>
423 <tr>
424 <td>%G</td>
425 <td>original image size (%wx%h; before any resizes)</td>
426 </tr>
427 <tr>
428 <td>%H</td>
429 <td>page (canvas) height</td>
430 </tr>
431 <tr>
432 <td>%M</td>
433 <td>Magick filename (original file exactly as given, including read mods)</td>
434 </tr>
435 <tr>
436 <td>%N</td>
437 <td>number of images in current image sequence, report once per image sequence</td>
438 </tr>
439 <tr>
440 <td>%O</td>
441 <td>page (canvas) offset ( = %X%Y )</td>
442 </tr>
443 <tr>
444 <td>%P</td>
445 <td>page (canvas) size ( = %Wx%H )</td>
446 </tr>
447 <tr>
448 <td>%Q</td>
449 <td>image compression quality ( 0 = default )</td>
450 </tr>
451 <tr>
452 <td>%S</td>
453 <td>?? scenes ??</td>
454 </tr>
455 <tr>
456 <td>%T</td>
457 <td>image time delay (in centi-seconds)</td>
458 </tr>
459 <tr>
460 <td>%U</td>
461 <td>image resolution units</td>
462 </tr>
463 <tr>
464 <td>%W</td>
465 <td>page (canvas) width</td>
466 </tr>
467 <tr>
468 <td>%X</td>
469 <td>page (canvas) x offset (including sign)</td>
470 </tr>
471 <tr>
472 <td>%Y</td>
473 <td>page (canvas) y offset (including sign)</td>
474 </tr>
475 <tr>
476 <td>%Z</td>
477 <td>unique filename (used for delegates)</td>
478 </tr>
479 <tr>
480 <td>%@</td>
481 <td>CALCULATED: trim bounding box (without actually trimming)</td>
482 </tr>
483 <tr>
484 <td>%#</td>
485 <td>CALCULATED: 'signature' hash of image values</td>
486 </tr>
487 </table></div>
488
489 <p>Here is a sample command and its output for an image with filename
490 <code>bird.miff</code> and whose width is 512 and height is 480.</p>
491
492 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>-> identify -format "%m:%f %wx%h" bird.miff
493 MIFF:bird.miff 512x480 </code></pre>
494
495 <p>Note that all single letter percent escapes can also be used using long
496 form (from IM version 6.7.6-9, see next). For example <code>%[f]</code> is
497 equivalent to the <code>%f</code> short form. </p>
498
499 <p><b>WARNING</b>: short form percent escapes are NOT performed when the percent
500 is after a number. For example, <code>10%x10</code> does not expand the
501 <code>%x</code> as a percent escape. If you specifically want to expand the
502 'x', use the long form which overrides this special case. EG:
503 <code>10%[x]10</code>. </p>
504
505 <p>Also be warned that calculated attributes can take some time to generate,
506 especially for large images.</p>
507
508 <h2>Long Form Attribute Percent Escapes</h2>
509
510 <p>In addition to the above specific and calculated attributes are recognized
511 when enclosed in braces (long form):</p>
512
513 <div>
514 <table class="table table-sm table-hover table-striped table-responsive">
515 <tr>
516 <td>%[basename]</td>
517 <td>base filename, no suffixes (as %t)</td>
518 </tr>
519 <tr>
520 <td>%[bit-depth]</td>
521 <td>Actual bit-depth of the pixel data</td>
522 </tr>
523 <tr>
524 <td>%[bounding-box]</td>
525 <td>upper left and lower right corners of the image bounding box</td>
526 </tr>
527 <tr>
528 <td>%[caption]</td>
529 <td>caption meta-data property</td>
530 </tr>
531 <tr>
532 <td>%[caption:lines]</td>
533 <td>returns the number lines generated when wrapping the caption</td>
534 </tr>
535 <tr>
536 <td>%[caption:pointsize]</td>
537 <td>returns the pointsize computed during caption: processing</td>
538 </tr>
539 <tr>
540 <td>%[channels]</td>
541 <td>colorspace neumonic followed by total number of channels and meta channels, e.g., <code>cmyka 8.3</code> indicates a CMYK image with alpha channel for a total of 8 channels and 3 meta channels.</td>
542 </tr>
543 <tr>
544 <td>%[colors]</td>
545 <td>Number of unique colors in the image (as of IM 7.0.3.8)</td>
546 </tr>
547 <tr>
548 <td>%[colorspace]</td>
549 <td>colorspace of Image Data (excluding transparency)</td>
550 </tr>
551 <tr>
552 <td>%[compose]</td>
553 <td>&nbsp;</td>
554 </tr>
555 <tr>
556 <td>%[compression]</td>
557 <td>image compression type</td>
558 </tr>
559 <tr>
560 <td><a href="../convex-hull/index.html">%[convex-hull]</a></td>
561 <td>points that form a convex hull around the foreground object. Use <code><a href="../command-line-options/index.html#define">-define</a> convex-hull:background-color=<em>color</em></code> to identify the image background color. Use <code><a href="../command-line-options/index.html#fuzz">-fuzz</a> to allow for a non-uniform background color. </td>
562 </tr>
563 <tr>
564 <td><a href="../convex-hull/index.html">%[convex-hull:extreme-points]</a></td>
565 <td>return the top, right, bottom, and left extreme points of the convex hull.</td>
566 </tr>
567 <tr>
568 <td>%[copyright]</td>
569 <td>ImageMagick Copyright String</td>
570 </tr>
571 <tr>
572 <td>%[depth]</td>
573 <td>depth of image for write (as input unless changed)</td>
574 </tr>
575 <tr>
576 <td>%[deskew:angle]</td>
577 <td>The deskew angle in degrees of rotation</td>
578 </tr>
579 <tr>
580 <td>%[directory]</td>
581 <td>directory part of filename (as %d)</td>
582 </tr>
583 <tr>
584 <td>%[distortion]</td>
585 <td>how well an image resembles a reference image (<a href="../command-line-options/index.html#compare" >-compare</a>)</td>
586 </tr>
587 <tr>
588 <td>%[dominant-color]</td>
589 <td>return the dominate image color in hex. Precede usage with <a href="../command-line-options/index.html#kmeans" >-kmeans</a>.</td>
590 </tr>
591 <tr>
592 <td>%[entropy]</td>
593 <td>CALCULATED: entropy of the image</td>
594 </tr>
595 <tr>
596 <td>%[extension]</td>
597 <td>extension part of filename (as %e)</td>
598 </tr>
599 <tr>
600 <td>%[gamma]</td>
601 <td>value of image gamma</td>
602 </tr>
603 <tr>
604 <td>%[group]</td>
605 <td>??? window group ???</td>
606 </tr>
607 <tr>
608 <td>%[height]</td>
609 <td>original height of image (when it was read in)</td>
610 </tr>
611 <tr>
612 <td>%[histogram:contrast-stretch]</td>
613 <td>computed min and max contrast stretch percentage</td>
614 </tr>
615 <tr>
616 <td>%[histogram:linear-stretch]</td>
617 <td>computed min and max linear stretch percentage</td>
618 </tr>
619 <tr>
620 <td>%[input]</td>
621 <td>the input image filename.</td>
622 </tr>
623 <tr>
624 <td>%[interlace]</td>
625 <td>Image interlace mode (as of IM 7.0.3.8)</td>
626 </tr>
627 <tr>
628 <td>%[kurtosis]</td>
629 <td>CALCULATED: kurtosis statistic of image</td>
630 </tr>
631 <tr>
632 <td>%[label]</td>
633 <td>label meta-data property</td>
634 </tr>
635 <tr>
636 <td>%[label:pointsize]</td>
637 <td>returns the pointsize computed during label: processing</td>
638 </tr>
639 <tr>
640 <td>%[magick]</td>
641 <td>coder used to read image (not the file suffix)</td>
642 </tr>
643 <tr>
644 <td>%[max]</td>
645 <td>CALCULATED: maximum value statistic of image</td>
646 </tr>
647 <tr>
648 <td>%[mean]</td>
649 <td>CALCULATED: average value statistic of image</td>
650 </tr>
651 <tr>
652 <td>%[median]</td>
653 <td>CALCULATED: median value statistic of image</td>
654 </tr>
655 <tr>
656 <td>%[min]</td>
657 <td>CALCULATED: minimum value statistic of image</td>
658 </tr>
659 <tr>
660 <td><a href="../convex-hull/index.html">%[minimum-bounding-box]</a></td>
661 <td>Use <code><a href="../command-line-options/index.html#define">-define</a> convex-hull:background-color=<em>color</em></code> to identify the image background color. Use <code><a href="../command-line-options/index.html#fuzz">-fuzz</a> to allow for a non-uniform background color. In addition to the bounding box points, these properties are set: <code>minimum-bounding-box:area</code>, <code>minimum-bounding-box:width</code>, <code>minimum-bounding-box:height</code>, <code>minimum-bounding-box:angle</code>, and <code>minimum-bounding-box:unrotate</code>.</td>
662 </tr>
663 <tr>
664 <td>%[opaque]</td>
665 <td>CALCULATED: is image fully-opaque?</td>
666 </tr>
667 <tr>
668 <td>%[orientation]</td>
669 <td>image orientation</td>
670 </tr>
671 <tr>
672 <td>%[page]</td>
673 <td>Virtual canvas (page) geometry</td>
674 </tr>
675 <tr>
676 <td>%[papersize:<em>name</em>]</td>
677 <td>paper size for <em>name</em> in pixels at 72DPI (e.g. papersize:A4)</td>
678 </tr>
679 <tr>
680 <td>%[printsize.x]</td>
681 <td>X printsize</td>
682 </tr>
683 <tr>
684 <td>%[printsize.y]</td>
685 <td>Y printsize</td>
686 </tr>
687 <tr>
688 <td>%[profile:icc]</td>
689 <td>ICC profile info</td>
690 </tr>
691 <tr>
692 <td>%[profile:icm]</td>
693 <td>ICM profile info</td>
694 </tr>
695 <tr>
696 <td>%[profiles]</td>
697 <td>list of any embedded profiles</td>
698 </tr>
699 <tr>
700 <td>%[quality]</td>
701 <td>Image quality value (as of IM 7.0.3.8)</td>
702 </tr>
703 <tr>
704 <td>%[rendering-intent]</td>
705 <td>Image rendering intent (as of IM 7.0.3.8)</td>
706 </tr>
707 <tr>
708 <td>%[resolution.x]</td>
709 <td>X density (resolution) without units</td>
710 </tr>
711 <tr>
712 <td>%[resolution.y]</td>
713 <td>Y density (resolution) without units</td>
714 </tr>
715 <tr>
716 <td>%[scene]</td>
717 <td>original scene number of image in input file</td>
718 </tr>
719 <tr>
720 <td>%[size]</td>
721 <td>original size of image (when it was read in)</td>
722 </tr>
723 <tr>
724 <td>%[skewness]</td>
725 <td>CALCULATED: skewness statistic of image</td>
726 </tr>
727 <tr>
728 <td>%[standard-deviation]</td>
729 <td>CALCULATED: standard deviation statistic of image</td>
730 </tr>
731 <tr>
732 <td>%[type]</td>
733 <td>CALCULATED: image type</td>
734 </tr>
735 <tr>
736 <td>%[unique]</td>
737 <td>unique temporary filename ???</td>
738 </tr>
739 <tr>
740 <td>%[units]</td>
741 <td>image resolution units</td>
742 </tr>
743 <tr>
744 <td>%[version]</td>
745 <td>Version Information of this running ImageMagick</td>
746 </tr>
747 <tr>
748 <td>%[width]</td>
749 <td>original width of image (when it was read in)</td>
750 </tr>
751 <tr>
752 <td>%[zero]</td>
753 <td>zero (unique filename for delegate use)</td>
754 </tr>
755 </table></div>
756
757 <h2>Properties</h2>
758
759 <p>All other long forms of percent escapes (not single letter long form) are
760 handled in a case insensitive manner. Such escapes will attempt to look
761 up that name specific data sources. </p>
762
763 <p>The primary search space (if not a specific attribute listed above) is
764 a free-form property string. Such strings are associated and saved with
765 images, and are typically set using either the <a href="../command-line-options/index.html#set" >-set</a>
766 CLI option (or API equivalent), or from special convenience options
767 (such as <a href="../command-line-options/index.html#label"
768 >-label</a>, <a href="../command-line-options/index.html#comment"
769 >-comment</a>, <a href="../command-line-options/index.html#caption"
770 >-caption</a>). </p>
771
772 <p>These convenience options are globally saved (as 'global options' so they can
773 be set before images are read), and later are transferred to the property of
774 individual images, only when they are read in. At that time any internal
775 percent escape present is then handled. </p>
776
777 <p>To change a property of an image already in memory, you need to use <a
778 href="../command-line-options/index.html#set" >-set</a>.
779 </p>
780
781 <p>Note that properties, like attributes (and profiles), are saved with
782 images when write, if the image file format allows. </p>
783
784
785 <h2>Artifacts and Options</h2>
786
787 <p>The previous percent escapes are associated with the primary Attributes and
788 Properties. Which is the original and primary focus of such percent escapes.
789 </p>
790
791 <p>However there are many operational settings that are used by various
792 ImageMagick operators that can be useful to set and later access. These
793 consist of per-image Artifacts, and Global options (associated with a list of
794 images, typically the current image list).</p>
795
796 <p>Note that the major difference between an artifact and a property is that
797 artifacts, being an internal operational setting, is not saved with images (if
798 such is possible). </p>
799
800 <p>For example when you use <code>-define 'distort:viewport=100x100'</code> you
801 are in fact generating a global option, which the <a href="../command-line-options/index.html#distort"
802 >-distort</a> operator will use to modify its behavior (distorted output
803 image 'view'). </p>
804
805 <p>An Option is essentially an Artifact that has been stored globally as part
806 of a list of images (specifically a 'Wand' of images). As such they are
807 identical, in that a Option, is simply a global Artifact for all the
808 associated images. </p>
809
810 <p>As such you can use <code>-set 'option:distort:viewport' '100x100'</code> to
811 achieve the same result of setting a Artifact for the disort operation to use.
812 </p>
813
814 <p><b>Internal Handling of a Global Option...</b></p>
815
816 <p>The Core library ('MagickCore') does not generally directly understand
817 Global Options. As such, continuing the previous example, the
818 <code>DistortImages()</code> function only looks up an artifact to discover if
819 a 'viewport' has been provided to it. </p>
820
821 <p>How Global Options are used when a library function requests an Artifact is
822 one of the key differences between IMv6 and IMv7.</p>
823
824 <p>Sets a link back to the global options
825 data, so that if a specific per-image Artifact is not found , then it will
826 look for a equivalent global Option for that image list. directly. This
827 saves coping these free-form options into artifacts repeatedly, and means you
828 can now separately define a global option for a list, and a individual
829 overriding artifact for a specific image in that list. </p>
830
831 <p>Note that many API's that do not use Wands (PerlMagick for example using
832 arrays of images rather than a Wand). In these API's you will not have Global
833 Options, only per-image Artifacts. </p>
834
835 <p>In summery a Global Option, if available, is equivalent to a per-image
836 Artifact. </p>
837
838
839 <h2>Glob-Pattern Listing of Properties, Artifacts and Options</h2>
840
841 <p>The <var>setting</var> can contain a glob pattern. As such you can
842 now list all free-form string properties, artifacts, and options, (but not
843 specific image attributes) using...</p>
844
845 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary cli"><code>magick ... \
846 -print "__Properties__\n%[*]" \
847 -print "__Artifacts__\n%[artifact:*]" \
848 -print "__Options__\n%[option:*]" \
849 ... </code></pre>
850
851 <p> The format of glob patterns are very specific and as such is generally
852 only used to list specific settings, such as when debugging, rather than being
853 used for image processing use. </p>
854
855
856 <h2>Calculated Percent Escape Prefixes</h2>
857
858 <p>There are some special prefixes (before the first ':') which performs
859 calculations based on the user provided string that follows that prefix. For
860 example you can do a numerical calculation use <code>%[fx:...]</code> to
861 evaluate the given <a href="../fx/index.html">FX</a> expressions:</p>
862
863 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>%[fx:<var>expression</var>] </code></pre>
864
865 <p>Use <code>pixel:</code> or <code>hex:</code> to evaluate a pixel color as defined by the <a
866 href="../fx/index.html">FX</a>
867 expression:</p>
868
869 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>%[pixel:<var>expression</var>] </code></pre>
870
871 <p>Use <a href="../command-line-options/index.html#define">-define</a> to specify the color compliance (e.g. <code>-define pixel:compliance=css</code>)</p>.
872
873 <h2>Specific Profile Percent Escape Prefixes</h2>
874
875 <p>You can also use the following special formatting syntax to print EXIF
876 mage meta-data that was included in the image read in:</p>
877
878 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>%[EXIF:<var>tag</var>] </code></pre>
879
880 <p>Choose <var>tag</var> from the following:</p>
881
882 <pre class="overflow-auto p-3 mb-2 text-body-secondary bg-body-tertiary" style="max-height:75svh;"><code>
883 * (print all EXIF tags, in keyword=data format)
884 ! (print all EXIF tags, in tag_number data format)
885 #hhhh (print data for EXIF tag #hhhh)
886 ImageWidth
887 ImageLength
888 BitsPerSample
889 Compression
890 PhotometricInterpretation
891 FillOrder
892 DocumentName
893 ImageDescription
894 Make
895 Model
896 StripOffsets
897 Orientation
898 SamplesPerPixel
899 RowsPerStrip
900 StripByteCounts
901 XResolution
902 YResolution
903 PlanarConfiguration
904 ResolutionUnit
905 TransferFunction
906 Software
907 DateTime
908 Artist
909 WhitePoint
910 PrimaryChromaticities
911 TransferRange
912 JPEGProc
913 JPEGInterchangeFormat
914 JPEGInterchangeFormatLength
915 YCbCrCoefficients
916 YCbCrSubSampling
917 YCbCrPositioning
918 ReferenceBlackWhite
919 CFARepeatPatternDim
920 CFAPattern
921 BatteryLevel
922 Copyright
923 ExposureTime
924 FNumber
925 IPTC/NAA
926 EXIFOffset
927 InterColorProfile
928 ExposureProgram
929 SpectralSensitivity
930 GPSInfo
931 ISOSpeedRatings
932 OECF
933 EXIFVersion
934 DateTimeOriginal
935 DateTimeDigitized
936 ComponentsConfiguration
937 CompressedBitsPerPixel
938 ShutterSpeedValue
939 ApertureValue
940 BrightnessValue
941 ExposureBiasValue
942 MaxApertureValue
943 SubjectDistance
944 MeteringMode
945 LightSource
946 Flash
947 FocalLength
948 MakerNote
949 UserComment
950 SubSecTime
951 SubSecTimeOriginal
952 SubSecTimeDigitized
953 FlashPixVersion
954 ColorSpace
955 EXIFImageWidth
956 EXIFImageLength
957 InteroperabilityOffset
958 FlashEnergy
959 SpatialFrequencyResponse
960 FocalPlaneXResolution
961 FocalPlaneYResolution
962 FocalPlaneResolutionUnit
963 SubjectLocation
964 ExposureIndex
965 SensingMethod
966 FileSource
967 SceneType </code></pre>
968 <br/>
969 <p>Surround the format specification with quotation marks to prevent your
970 shell from misinterpreting any spaces and square brackets.</p>
971
972 <p>The following special formatting syntax can be used to print IPTC
973 information contained in the file:</p>
974
975 <pre class="p-3 mb-2 text-body-secondary bg-body-tertiary"><code>%[IPTC:<var>dataset</var>:<var>record</var>] </code></pre>
976
977 <p>Select <var>dataset</var> and <var>record</var> from the following:</p>
978
979 <pre class="overflow-auto p-3 mb-2 text-body-secondary bg-body-tertiary text-body-secondary bg-body-tertiary;" style="max-height:75svh;"><code>
980 Envelope Record
981 1:00 Model Version
982 1:05 Destination
983 1:20 File Format
984 1:22 File Format Version
985 1:30 Service Identifier
986 1:40 Envelope Number
987 1:50 Product ID
988 1:60 Envelope Priority
989 1:70 Date Sent
990 1:80 Time Sent
991 1:90 Coded Character Set
992 1:100 UNO (Unique Name of Object)
993 1:120 ARM Identifier
994 1:122 ARM Version
995
996 Application Record
997 2:00 Record Version
998 2:03 Object Type Reference
999 2:05 Object Name (Title)
1000 2:07 Edit Status
1001 2:08 Editorial Update
1002 2:10 Urgency
1003 2:12 Subject Reference
1004 2:15 Category
1005 2:20 Supplemental Category
1006 2:22 Fixture Identifier
1007 2:25 Keywords
1008 2:26 Content Location Code
1009 2:27 Content Location Name
1010 2:30 Release Date
1011 2:35 Release Time
1012 2:37 Expiration Date
1013 2:38 Expiration Time
1014 2:40 Special Instructions
1015 2:42 Action Advised
1016 2:45 Reference Service
1017 2:47 Reference Date
1018 2:50 Reference Number
1019 2:55 Date Created
1020 2:60 Time Created
1021 2:62 Digital Creation Date
1022 2:63 Digital Creation Time
1023 2:65 Originating Program
1024 2:70 Program Version
1025 2:75 Object Cycle
1026 2:80 By-Line (Author)
1027 2:85 By-Line Title (Author Position) [Not used in Photoshop 7]
1028 2:90 City
1029 2:92 Sub-Location
1030 2:95 Province/State
1031 2:100 Country/Primary Location Code
1032 2:101 Country/Primary Location Name
1033 2:103 Original Transmission Reference
1034 2:105 Headline
1035 2:110 Credit
1036 2:115 Source
1037 2:116 Copyright Notice
1038 2:118 Contact
1039 2:120 Caption/Abstract
1040 2:122 Caption Writer/Editor
1041 2:125 Rasterized Caption
1042 2:130 Image Type
1043 2:131 Image Orientation
1044 2:135 Language Identifier
1045 2:150 Audio Type
1046 2:151 Audio Sampling Rate
1047 2:152 Audio Sampling Resolution
1048 2:153 Audio Duration
1049 2:154 Audio Outcue
1050 2:200 ObjectData Preview File Format
1051 2:201 ObjectData Preview File Format Version
1052 2:202 ObjectData Preview Data
1053
1054 Pre-ObjectData Descriptor Record
1055 7:10 Size Mode
1056 7:20 Max Subfile Size
1057 7:90 ObjectData Size Announced
1058 7:95 Maximum ObjectData Size
1059
1060 ObjectData Record
1061 8:10 Subfile
1062
1063 Post ObjectData Descriptor Record
1064 9:10 Confirmed ObjectData Size</code></pre>
1065 </div>
1066
1067 </div>
1068 <div class="col-md-3">
1069 <div class="container text-center my-3">
1070 <a href="../image/wizard.png" rel="noopener noreferrer" target="_blank">
1071 <img alt="The Tao of the Spiritual Warrior" class="img-fluid img-thumbnail" height="1468" loading="lazy" src="../image/wizard.png" width="1104">
1072 </a>
1073 <p class="mt-2"><iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe></p>
1074 </div>
1075 <div class="container text-center my-3">
1076 <script async src="https://localhost/pagead/js/adsbygoogle.js?client=ca-pub-3129977114552745"
1077 crossorigin="anonymous"></script>
1078 <!-- Banner Ad -->
1079 <ins class="adsbygoogle"
1080 style="display:block"
1081 data-ad-client="ca-pub-3129977114552745"
1082 data-ad-slot="1083537442"
1083 data-ad-format="auto"
1084 data-full-width-responsive="true"></ins>
1085 <script>
1086 (adsbygoogle = window.adsbygoogle || []).push({});
1087 </script>
1088 </div>
1089 </div>
1090 </div>
1091 <a aria-label="About ImageMagick" class="btn btn-outline-warning mt-3" href="../index-2.html">About ImageMagick</a>
1092 </main><!-- /.container -->
1093 <footer class="text-center pt-5 my-5 text-body-secondary border-top">
1094 <div class="container-fluid">
1095 <a href="../security-policy/index.html">Security</a> •
1096 <a href="../news/index.html">News</a>
1097 &nbsp;
1098 <a href="#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../image/wand.ico"></a>
1099 &nbsp;
1100 <a href="../links/index.html">Related</a> •
1101 <a href="../sitemap/index.html">Sitemap</a>
1102 <br>
1103 <a href="../support/index.html">Sponsor</a> •
1104 <a href="../cite/index.html">Cite</a> •
1105 <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
1106 <a href="https://github.com/ImageMagick/ImageMagick/discussions">Contact Us</a>
1107 <br>
1108 <a href="https://github.com/imagemagick/imagemagick" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 499.36" width="2%" height="2%" role="img" focusable="false">
1109 <title>GitHub</title>
1110 <path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z" />
1111 </svg></a> •
1112 <a href="https://twitter.com/imagemagick" rel="noopener noreferrer" target="_blank" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 300 300" width="2%" height="2%" role="img" focusable="false">
1113 <title>Twitter</title>
1114 <path d="M178.57 127.15 290.27 0h-26.46l-97.03 110.38L89.34 0H0l117.13 166.93L0 300.25h26.46l102.4-116.59 81.8 116.59h89.34M36.01 19.54H76.66l187.13 262.13h-40.66" />
1115 </svg></a>
1116 <br>
1117 <small>Copyright © 1999 ImageMagick Studio LLC</small>
1118 </div>
1119 </footer>
1120 <div style="visibility: hidden;">
1121 <div class="gcse-search"></div>
1122 </div>
1123 </div>
1124
1125 <!-- Javascript assets -->
1126 <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
1127 </body>
1128
1129
1130 </html>