GraphicsMagick

- Home
- Project
- Download
- Install
- Source
- News
- Utilities
- Programming
- Reference

# Special Format Characters

The Magick::Image methods annotate, draw, label, and the template function montageImages 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:

Format Characters
Format Character | Description
--- | ---
%b | file size
%d | directory
%e | filename extension
%f | filename
%h | height
%m | magick (e.g GIF)
%p | page number
%s | scene number
%t | top of filename
%w | width
%x | x resolution
%y | y resolution
n | newline
r | carriage return

Copyright © Bob Friesenhahn 1999 - 2021

Copyright © GraphicsMagick Group 2002 - 2021