<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Magick++ API: Annotating an Image</title>
<link rel="stylesheet" href="magick.css" type="text/css" />
</head>
<body>
<div class="doc-section">
<h1 align="center">Special Format Characters</h1>
<p style="margin-bottom: 0cm">The Magick::Image methods <a href="Image++.html#annotate"><i>annotate</i></a>, <a href="Image++.html#draw"><i>draw</i></a>, <a href="Image++.html#label"><i>label</i></a>, and the template function <i>montageImages</i> support special format characters contained in the argument text. These format characters work similar to C's <i>printf</i>. 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>
<br />
<p align="center" style="margin-bottom: 0cm"><b>Format Characters</b></p>
<center>
<table width="50%" border="1" cellpadding="2" cellspacing="3">
<col width="131*" />
<col width="125*" />
<tr>
<td width="51%">
<p align="center"><b>Format Character</b></p></td>
<td width="49%">
<p align="center"><b>Description</b></p></td></tr>
<tr>
<td width="51%">
<p align="center">%b</p></td>
<td width="49%">
<p>file size</p></td></tr>
<tr>
<td width="51%">
<p align="center">%d</p></td>
<td width="49%">
<p>directory</p></td></tr>
<tr>
<td width="51%">
<p align="center">%e</p></td>
<td width="49%">
<p>filename extension</p></td></tr>
<tr>
<td width="51%">
<p align="center">%f</p></td>
<td width="49%">
<p>filename</p></td></tr>
<tr>
<td width="51%">
<p align="center">%h</p></td>
<td width="49%">
<p>height</p></td></tr>
<tr>
<td width="51%">
<p align="center">%m</p></td>
<td width="49%">
<p>magick (e.g GIF)</p></td></tr>
<tr>
<td width="51%">
<p align="center">%p</p></td>
<td width="49%">
<p>page number</p></td></tr>
<tr>
<td width="51%">
<p align="center">%s</p></td>
<td width="49%">
<p>scene number</p></td></tr>
<tr>
<td width="51%">
<p align="center">%t</p></td>
<td width="49%">
<p>top of filename</p></td></tr>
<tr>
<td width="51%">
<p align="center">%w</p></td>
<td width="49%">
<p>width</p></td></tr>
<tr>
<td width="51%">
<p align="center">%x</p></td>
<td width="49%">
<p>x resolution</p></td></tr>
<tr>
<td width="51%">
<p align="center">%y</p></td>
<td width="49%">
<p>y resolution</p></td></tr>
<tr>
<td width="51%">
<p align="center">\n</p></td>
<td width="49%">
<p>newline</p></td></tr>
<tr>
<td width="51%">
<p align="center">\r</p></td>
<td width="49%">
<p>carriage return</p></td></tr></table></center>
</div>
</body>
</html>