1 <?xml version="1.0" encoding="utf-8" ?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <title>Magick++ API: Annotating an Image</title> 7 <link rel="stylesheet" href="magick.css" type="text/css" /> 8 </head> 9 <body> 10 <div class="doc-section"> 11 <h1 align="center">Special Format Characters</h1> 12 <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> 13 <br /> 14 <p align="center" style="margin-bottom: 0cm"><b>Format Characters</b></p> 15 <center> 16 <table width="50%" border="1" cellpadding="2" cellspacing="3"> 17 <col width="131*" /> 18 <col width="125*" /> 19 <tr> 20 <td width="51%"> 21 <p align="center"><b>Format Character</b></p></td> 22 <td width="49%"> 23 <p align="center"><b>Description</b></p></td></tr> 24 <tr> 25 <td width="51%"> 26 <p align="center">%b</p></td> 27 <td width="49%"> 28 <p>file size</p></td></tr> 29 <tr> 30 <td width="51%"> 31 <p align="center">%d</p></td> 32 <td width="49%"> 33 <p>directory</p></td></tr> 34 <tr> 35 <td width="51%"> 36 <p align="center">%e</p></td> 37 <td width="49%"> 38 <p>filename extension</p></td></tr> 39 <tr> 40 <td width="51%"> 41 <p align="center">%f</p></td> 42 <td width="49%"> 43 <p>filename</p></td></tr> 44 <tr> 45 <td width="51%"> 46 <p align="center">%h</p></td> 47 <td width="49%"> 48 <p>height</p></td></tr> 49 <tr> 50 <td width="51%"> 51 <p align="center">%m</p></td> 52 <td width="49%"> 53 <p>magick (e.g GIF)</p></td></tr> 54 <tr> 55 <td width="51%"> 56 <p align="center">%p</p></td> 57 <td width="49%"> 58 <p>page number</p></td></tr> 59 <tr> 60 <td width="51%"> 61 <p align="center">%s</p></td> 62 <td width="49%"> 63 <p>scene number</p></td></tr> 64 <tr> 65 <td width="51%"> 66 <p align="center">%t</p></td> 67 <td width="49%"> 68 <p>top of filename</p></td></tr> 69 <tr> 70 <td width="51%"> 71 <p align="center">%w</p></td> 72 <td width="49%"> 73 <p>width</p></td></tr> 74 <tr> 75 <td width="51%"> 76 <p align="center">%x</p></td> 77 <td width="49%"> 78 <p>x resolution</p></td></tr> 79 <tr> 80 <td width="51%"> 81 <p align="center">%y</p></td> 82 <td width="49%"> 83 <p>y resolution</p></td></tr> 84 <tr> 85 <td width="51%"> 86 <p align="center">\n</p></td> 87 <td width="49%"> 88 <p>newline</p></td></tr> 89 <tr> 90 <td width="51%"> 91 <p align="center">\r</p></td> 92 <td width="49%"> 93 <p>carriage return</p></td></tr></table></center> 94 </div> 95 </body> 96 </html> 97