An option has been added for overlaying a text label on an image.
-txtlabel(<text>;<font name>;<font size>;<location>;X;Y;
<bkmode>;<italic>;<underline>;<rot_angle>;<striked>;
<charset>;<align>;<txt_color>;<bg_color>)
<text> -- a text string. E.g. "Hello world!"
<font name> -- font name. E.g.: "Times New Roman"
<font size> -- font size. E.g.: 25
<location> -- anchor point (place on original image
where text will be added):
0 - top left corner
1 - top right corner
2 - bottom right corner
3 - bottom left corner
4 - center
X -- text shift on X axis (in pixels)
Y -- text shift on Y axis (in pixels)
<bkmode> -- way of filling text background:
0 - transparent background
1 - fill the background with the color specified in <bg_color>
parameter
<italic> -- italic characters on/off
0 - italic off
1 - italic on
<underline> -- underlined characters on/off
0 - on
1 - off
<rot_angle> -- text string rotation angle in degrees.
E.g.: 15
<striked> -- striked characters on/off
0 - on
1 - off
<charset> -- characters set. Possible values:
0 - ANSI_CHARSET
1 - DEFAULT_CHARSET
2 - SYMBOL_CHARSET
77 - MAC_CHARSET
128 - SHIFTJIS_CHARSET
129 - HANGUL_CHARSET
130 - JOHAB_CHARSET
134 - GB2312_CHARSET
136 - CHINESEBIG5_CHARSET
161 - GREEK_CHARSET
162 - TURKISH_CHARSET
163 - VIETNAMESE_CHARSET
177 - HEBREW_CHARSET
178 - ARABIC_CHARSET
186 - BALTIC_CHARSET
204 - RUSSIAN_CHARSET
222 - THAI_CHARSET
238 - EASTEUROPE_CHARSET
255 - OEM_CHARSET
<align> -- text alignment. Possible values:
0 - TA_LEFT
0 - TA_TOP
2 - TA_RIGHT
6 - TA_CENTER
8 - TA_BOTTOM
24 - TA_BASELINE
<align> value can be compound. E.g.:
align = TA_BOTTOM + TA_RIGHT = 8 + 2 = 10
<txt_color> -- text color. E.g: 255 (red)
<bg_color> -- background color. Used only if <bkmode>
= 1.
E.g.: 65535 (yellow)
In case of a palette image (b/w, 16 colors or 256 colors),
if colors of the text or the background are not in the image
palette the image will be converted into RGB color space (24
bpp). Note that this process will take much time. If your input
images are black-and-white only (e.g. scanned faxes) and output
images are also supposed to be black-and-white, there is no
sence in specifying any text color or font color but black (e.g.:
txt_color = 0) or white (e.g._color =16777215) as it will only
greatly slow the conversion process still resulting in black
or white text.