]> granicus.if.org Git - imagemagick/blobdiff - www/escape.html
...
[imagemagick] / www / escape.html
index 346c27b47e6ceaa11b6f14fb3743264e3436a68b..7e8b74fdbc1c34df710437640adec3175db5f247 100644 (file)
@@ -5,32 +5,69 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
+  <meta charset="utf-8"  />
+  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"  />
+  <title>Format and Print Image Properties @ ImageMagick</title>
+  <meta name="application-name" content="ImageMagick" />
+  <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves." />
+  <meta name="application-url" content="https://www.imagemagick.org" />
+  <meta name="generator" content="PHP" />
+  <meta name="keywords" content="format, print, image, properties, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" />
+  <meta name="rating" content="GENERAL" />
+  <meta name="robots" content="INDEX, FOLLOW" />
+  <meta name="generator" content="ImageMagick Studio LLC" />
+  <meta name="author" content="ImageMagick Studio LLC" />
+  <meta name="revisit-after" content="2 DAYS" />
+  <meta name="resource-type" content="document" />
+  <meta name="copyright" content="Copyright (c) 1999-2017 ImageMagick Studio LLC" />
+  <meta name="distribution" content="Global" />
+  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
-    <title>ImageMagick: Format and Print Image Properties</title>
-  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
-  <meta name="application-name" content="ImageMagick"/>
-  <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
-  <meta name="application-url" content="http://www.imagemagick.org"/>
-  <meta name="generator" content="PHP"/>
-  <meta name="keywords" content="format, print, image, properties, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
-  <meta name="rating" content="GENERAL"/>
-  <meta name="robots" content="INDEX, FOLLOW"/>
-  <meta name="generator" content="ImageMagick Studio LLC"/>
-  <meta name="author" content="ImageMagick Studio LLC"/>
-  <meta name="revisit-after" content="2 DAYS"/>
-  <meta name="resource-type" content="document"/>
-  <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC"/>
-  <meta name="distribution" content="Global"/>
-  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
-  <link rel="icon" href="../images/wand.png"/>
-  <link rel="shortcut icon" href="../images/wand.ico"/>
-  <link rel="stylesheet" href="css/magick.css"/>
+  <link href="../www/escape.html" rel="canonical" />
+  <link href="../images/wand.png" rel="icon" />
+  <link href="../images/wand.ico" rel="shortcut icon" />
+  <link href="assets/magick.css" rel="stylesheet" />
 </head>
 <body>
-<div class="main">
-<div class="magick-masthead">
+  <header>
+  <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
+    <a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a>
+    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
+      <span class="navbar-toggler-icon"></span>
+    </button>
+
+    <div class="navbar-collapse collapse" id="navbarsExampleDefault" style="">
+    <ul class="navbar-nav mr-auto">
+      <li class="nav-item ">
+        <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a>
+      </li>
+      <li class="nav-item ">
+        <a class="nav-link" href="download.html">Download</a>
+      </li>
+      <li class="nav-item ">
+        <a class="nav-link" href="command-line-tools.html">Tools</a>
+      </li>
+      <li class="nav-item ">
+        <a class="nav-link" href="command-line-processing.html">Command-line</a>
+      </li>
+      <li class="nav-item ">
+        <a class="nav-link" href="resources.html">Resources</a>
+      </li>
+      <li class="nav-item ">
+        <a class="nav-link" href="develop.html">Develop</a>
+      </li>
+      <li class="nav-item">
+        <a class="nav-link" target="_blank" href="https://www.imagemagick.org/discourse-server/">Community</a>
+      </li>
+    </ul>
+    <form class="form-inline my-2 my-lg-0" action="https://www.imagemagick.org/script/search.php">
+      <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
+      <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
+    </form>
+    </div>
+  </nav>
   <div class="container">
-    <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
+   <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
          style="display:block"
          data-ad-client="ca-pub-3129977114552745"
          data-ad-slot="6345125851"
     <script>
       (adsbygoogle = window.adsbygoogle || []).push({});
     </script>
-    <nav class="magick-nav">
-      <a class="magick-nav-item " href="../index.html">Home</a>
-      <a class="magick-nav-item " href="binary-releases.html">Download</a>
-      <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
-      <a class="magick-nav-item " href="command-line-processing.html">Command-line</a>
-      <a class="magick-nav-item " href="resources.html">Resources</a>
-      <a class="magick-nav-item " href="api.html">Develop</a>
-      <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
-      <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
-    </nav>
+
   </div>
-</div>
-<div class="container">
+  </header>
+  <main class="container">
+    <div class="magick-template">
 <div class="magick-header">
 <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="command-line-options.html#format_identify_">-format</a> or in montage <a href="command-line-options.html#label" >-label</a>, to print various properties and other settings associated with an image.</p>
 
     </td></tr>
 </table></div>
 
-<h3 class="magick-header">Percent Escape Handling</h3>
+<h3>Percent Escape Handling</h3>
 
 <p>If you request a percent escape such as <code>%[key]</code> the setting
 is looked for in the following order until the first match has been
@@ -121,20 +150,19 @@ insensitive manner. </p>
 free-form string tables directly, allowing you to override the above sequence,
 and avoid accessing an attribute or property of the same name.</p>
 
-<pre>
-%[artifact:<var>setting</var>]
+<pre class="highlight"><code>%[artifact:<var>setting</var>]
 %[option:<var>setting</var>]
-</pre>
+</code></pre>
 
 
-<h3 class="magick-header">Single Letter Attribute Percent Escapes</h3>
+<h3>Single Letter Attribute Percent Escapes</h3>
 
 <p>Here are common single letter escapes (short form) is used to report the most
 common attributes and properties of an image, such as: the image filename
 filename, type, width, height. </p>
 
 <div class="table-responsive">
-<table class="table table-condensed table-striped">
+<table class="table table-sm table-striped">
   <tr>
     <td>\n</td>
     <td>newline</td>
@@ -161,7 +189,7 @@ filename, type, width, height. </p>
   </tr>
   <tr>
     <td>%b</td>
-    <td>file size of image read in</td>
+    <td>file size of image read in (use <a href="escape.html#precision">-precision</a> 16 to force results in B)</td>
   </tr>
   <tr>
     <td>%c</td>
@@ -255,6 +283,10 @@ filename, type, width, height. </p>
     <td>%A</td>
     <td>image transparency channel enabled (true/false)</td>
   </tr>
+  <tr>
+    <td>%B</td>
+    <td>file size of image read in bytes</td>
+  </tr>
   <tr>
     <td>%C</td>
     <td>image compression type</td>
@@ -328,10 +360,9 @@ filename, type, width, height. </p>
 <p>Here is a sample command and its output for an image with filename
 <code>bird.miff</code> and whose width is 512 and height is 480.</p>
 
-<pre>
--> identify -format "%m:%f %wx%h" bird.miff
+<pre class="highlight"><code>-> identify -format "%m:%f %wx%h" bird.miff
 MIFF:bird.miff 512x480
-</pre>
+</code></pre>
 
 <p>Note that all single letter percent escapes can also be used using long
 form (from IM version 6.7.6-9, see next). For example <code>%[f]</code> is
@@ -346,24 +377,48 @@ is after a number.  For example,  <code>10%x10</code> does not expand the
 <p>Also be warned that calculated attributes can take some time to generate,
 especially for large images.</p>
 
-<h3 class="magick-header">Long Form Attribute Percent Escapes</h3>
+<h3>Long Form Attribute Percent Escapes</h3>
 
 <p>In addition to the above specific and calculated attributes are recognized
 when enclosed in braces (long form):</p>
 
 <div class="table-responsive">
-<table class="table table-condensed table-striped">
+<table class="table table-sm table-striped">
   <tr>
-    <td>%[base]</td>
+    <td>%[basename]</td>
     <td>base filename, no suffixes (as %t)</td>
   </tr>
+  <tr>
+    <td>%[bit-depth]</td>
+    <td>Actual bit-depth of the pixel data</td>
+  </tr>
+  <tr>
+    <td>%[caption]</td>
+    <td>caption meta-data property</td>
+  </tr>
+   <tr>
+    <td>%[caption:pointsize]</td>
+    <td>returns the pointsize computed during caption: processing (as of IM 6.9.1-0)</td>
+  </tr>
   <tr>
     <td>%[channels]</td>
     <td>??? channels in use - colorspace ???</td>
   </tr>
+  <tr>
+    <td>%[colors]</td>
+    <td>Number of unique colors in the image (as of IM 7.0.3.8)</td>
+  </tr>
   <tr>
     <td>%[colorspace]</td>
-    <td>Colorspace of Image Data (excluding transparency)</td>
+    <td>colorspace of Image Data (excluding transparency)</td>
+  </tr>
+  <tr>
+    <td>%[compose]</td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td>%[compression]</td>
+    <td>image compression type (as of IM 6.9.6-6)</td>
   </tr>
   <tr>
     <td>%[copyright]</td>
@@ -405,6 +460,14 @@ when enclosed in braces (long form):</p>
     <td>%[height]</td>
     <td>original height of image (when it was read in)</td>
   </tr>
+  <tr>
+    <td>%[input]</td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td>%[interlace]</td>
+    <td>Image interlace mode (as of IM 7.0.3.8)</td>
+  </tr>
   <tr>
     <td>%[kurtosis]</td>
     <td>CALCULATED: kurtosis statistic of image</td>
@@ -412,6 +475,10 @@ when enclosed in braces (long form):</p>
   <tr>
     <td>%[label]</td>
     <td>label meta-data property</td>
+  </tr>
+   <tr>
+    <td>%[label:pointsize]</td>
+    <td>returns the pointsize computed during label: processing (as of IM 6.9.1-0)</td>
   </tr>
   <tr>
     <td>%[magick]</td>
@@ -429,10 +496,6 @@ when enclosed in braces (long form):</p>
     <td>%[min]</td>
     <td>CALCULATED: minimum value statistic of image</td>
   </tr>
-  <tr>
-    <td>%[name]</td>
-    <td>The original name of the image</td>
-  </tr>
   <tr>
     <td>%[opaque]</td>
     <td>CALCULATED: is image fully-opaque?</td>
@@ -457,6 +520,14 @@ when enclosed in braces (long form):</p>
     <td>%[profiles]</td>
     <td>list of any embedded profiles</td>
   </tr>
+  <tr>
+    <td>%[quality]</td>
+    <td>Image quality value (as of IM 7.0.3.8)</td>
+  </tr>
+  <tr>
+    <td>%[rendering-intent]</td>
+    <td>Image rendering intent (as of IM 7.0.3.8)</td>
+  </tr>
   <tr>
     <td>%[resolution.x]</td>
     <td>X density (resolution) without units</td>
@@ -507,7 +578,7 @@ when enclosed in braces (long form):</p>
   </tr>
 </table></div>
 
-<h3 class="magick-header">Properties</h3>
+<h3>Properties</h3>
 
 <p>All other long forms of percent escapes (not single letter long form) are
 handled in a case insensitive manner. Such escapes will will attempt to look
@@ -535,7 +606,7 @@ href="command-line-options.html#set" >-set</a>.
 images when write, if the image file format allows. </p>
 
 
-<h3 class="magick-header">Artifacts and Options</h3>
+<h3>Artifacts and Options</h3>
 
 <p>The previous percent escapes are associated with the primary Attributes and
 Properties. Which is the original and primary focus of such percent escapes.
@@ -594,56 +665,52 @@ Options, only per-image Artifacts. </p>
 Artifact. </p>
 
 
-<h3 class="magick-header">Glob-Pattern Listing of Properties, Artifacts and Options</h3>
+<h3>Glob-Pattern Listing of Properties, Artifacts and Options</h3>
 
 <p>The <var>setting</var> can contain a glob pattern. As such you can
 now list all free-form string properties, artifacts, and options, (but not
 specific image attributes) using...</p>
 
-<pre>
-convert ... \
+<pre class="highlight"><code>convert ... \
    -print "__Properties__\n%[*]" \
    -print "__Artifacts__\n%[artifact:*]" \
    -print "__Options__\n%[option:*]" \
    ...
-</pre>
+</code></pre>
 
 <p> The format of glob patterns are very specific and as such is generally
 only used to list specific settings, such as when debugging, rather than being
 used for image processing use. </p>
 
 
-<h3 class="magick-header">Calculated Percent Escape Prefixes</h3>
+<h3>Calculated Percent Escape Prefixes</h3>
 
 <p>There are some special prefixes (before the first ':') which performs
 calculations based on the user provided string that follows that prefix.  For
 example you can do a numerical calculation use <code>%[fx:...]</code> to
 evaluate the given <a href="fx.html">FX</a> expressions:</p>
 
-<pre>
-%[fx:<var>expression</var>]
-</pre>
+<pre class="highlight"><code>%[fx:<var>expression</var>]
+</code></pre>
 
-<p>Use <code>pixel:</code> to evaluate a pixel color as defined by the <a
+<p>Use <code>pixel:</code> or <code>hex:</code> to evaluate a pixel color as defined by the <a
 href="fx.html">FX</a>
 expression:</p>
 
-<pre>
-%[pixel:<var>expression</var>]
-</pre>
+<pre class="highlight"><code>%[pixel:<var>expression</var>]
+</code></pre>
 
-<h3 class="magick-header">Specific Profile Percent Escape Prefixes</h3>
+<h3>Specific Profile Percent Escape Prefixes</h3>
 
 <p>You can also use the following special formatting syntax to print EXIF
 mage meta-data that was included in the image read in:</p>
 
-<pre>
-%[EXIF:<var>tag</var>]
-</pre>
+<pre class="highlight"><code>%[EXIF:<var>tag</var>]
+</code></pre>
 
 <p>Choose <var>tag</var> from the following:</p>
 
-<pre class="pre-scrollable">
+<pre class="pre-scrollable"><code>
 *  (print all EXIF tags, in keyword=data format)
 !  (print all EXIF tags, in tag_number data format)
 #hhhh (print data for EXIF tag #hhhh)
@@ -729,7 +796,7 @@ ExposureIndex
 SensingMethod
 FileSource
 SceneType
-</pre>
+</code></pre>
 <br/>
 <p>Surround the format specification with quotation marks to prevent your
 shell from misinterpreting any spaces and square brackets.</p>
@@ -737,9 +804,8 @@ shell from misinterpreting any spaces and square brackets.</p>
 <p>The following special formatting syntax can be used to print IPTC
 information contained in the file:</p>
 
-<pre>
-%[IPTC:<var>dataset</var>:<var>record</var>]
-</pre>
+<pre class="highlight"><code>%[IPTC:<var>dataset</var>:<var>record</var>]
+</code></pre>
 
 <p>Select <var>dataset</var> and <var>record</var> from the following:</p>
 
@@ -829,24 +895,28 @@ ObjectData Record
 
 Post ObjectData Descriptor Record
   9:10   Confirmed ObjectData Size
-</pre>
+</code></pre>
 </div>
+    </div>
+  </main><!-- /.container -->
   <footer class="magick-footer">
-    <p><a href="support.html">Donate</a> •
-     <a href="sitemap.html">Sitemap</a> •
+    <p><a href="security-policy.html">Security</a> •
+    <a href="architecture.html">Architecture</a> •
     <a href="links.html">Related</a> •
-    <a href="architecture.html">Architecture</a>
-</p>
-    <p><a href="escape.html#">Back to top</a> •
-    <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
-    <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
-        <p><small>©  1999-2016 ImageMagick Studio LLC</small></p>
+     <a href="sitemap.html">Sitemap</a>
+       
+    <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>
+       
+    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
+    <a href="support.html">Donate</a> •
+    <a href="https://www.imagemagick.org/script/contact.php">Contact Us</a>
+    <br/>
+        <small>© 1999-2018 ImageMagick Studio LLC</small></p>
   </footer>
-</div><!-- /.container -->
 
-  <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
-  <script src="../js/magick.html"></script>
-</div>
+  <!-- Javascript assets -->
+  <script src="assets/magick.js" crossorigin="anonymous"></script>
+  <script>window.jQuery || document.write('<script src="assets/jquery.min.js"><\/script>')</script>
 </body>
 </html>
-<!-- Magick Cache 30th May 2016 12:43 -->
\ No newline at end of file
+<!-- Magick Cache 8th July 2018 08:37 -->
\ No newline at end of file