1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="en" name="language">
<title>Special Format Characters</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link media="screen" href="../docutils-articles.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
<input type="hidden" name="domains" value="www.graphicsmagick.org" />
<input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" /> <input type="submit" name="sa" value="Search" /></span>
</form>
</div>
<div class="navmenu">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../project.html">Project</a></li>
<li><a href="../download.html">Download</a></li>
<li><a href="../README.html">Install</a></li>
<li><a href="../Hg.html">Source</a></li>
<li><a href="../NEWS.html">News</a> </li>
<li><a href="../utilities.html">Utilities</a></li>
<li><a href="../programming.html">Programming</a></li>
<li><a href="../reference.html">Reference</a></li>
</ul>
</div>
<main id="special-format-characters">
<h1 class="title">Special Format Characters</h1>
<!-- -*- mode: rst -*- -->
<!-- This text is in reStucturedText format, so it may look a bit odd. -->
<!-- See http://docutils.sourceforge.net/rst.html for details. -->
<p>The Magick::Image methods <a class="reference external" href="Image.html#annotate">annotate</a>, <a class="reference external" href="Image.html#draw">draw</a>, <a class="reference external" href="Image.html#label">label</a>, and the template
function <a class="reference external" href="STL.html#montageImages">montageImages</a> support special
format characters contained in the argument text. These format
characters work similar to C's printf. Whenever a format character
appears in the text, it is replaced with the equivalent attribute
text. The available format characters are shown in the following
table:</p>
<table>
<caption>Format Characters</caption>
<colgroup>
<col style="width: 37%" />
<col style="width: 63%" />
</colgroup>
<thead>
<tr><th class="head"><p>Format Character</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr><td><p>%b</p></td>
<td><p>file size</p></td>
</tr>
<tr><td><p>%d</p></td>
<td><p>directory</p></td>
</tr>
<tr><td><p>%e</p></td>
<td><p>filename extension</p></td>
</tr>
<tr><td><p>%f</p></td>
<td><p>filename</p></td>
</tr>
<tr><td><p>%h</p></td>
<td><p>height</p></td>
</tr>
<tr><td><p>%m</p></td>
<td><p>magick (e.g GIF)</p></td>
</tr>
<tr><td><p>%p</p></td>
<td><p>page number</p></td>
</tr>
<tr><td><p>%s</p></td>
<td><p>scene number</p></td>
</tr>
<tr><td><p>%t</p></td>
<td><p>top of filename</p></td>
</tr>
<tr><td><p>%w</p></td>
<td><p>width</p></td>
</tr>
<tr><td><p>%x</p></td>
<td><p>x resolution</p></td>
</tr>
<tr><td><p>%y</p></td>
<td><p>y resolution</p></td>
</tr>
<tr><td><p>n</p></td>
<td><p>newline</p></td>
</tr>
<tr><td><p>r</p></td>
<td><p>carriage return</p></td>
</tr>
</tbody>
</table>
<p>Copyright © Bob Friesenhahn 1999 - 2022</p>
</main>
<hr class="docutils">
<div class="document">
<p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002-2025<!--SPONSOR_LOGO--></p>
</div>
</main>
</body>
</html>
|