G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 3.4.3        Current pre-release: 3.5.0 (2024/12/18)

Reference

Table of Contents  ▸  List of Commands  ▸  Image Drawing  ▸  text◀  tetraedron_shade    |    text_outline  ▶

text

Built-in command

Arguments:

Description:

Draw specified colored text string on selected images.

(equivalent to shortcut command t).


If one of the x or y argument ends with a ~, its value is expected to be a centering ratio (in [0,1]) rather than a position.
Usual centering ratio are { 0:left-justified | 0.5:centered | 1:right-justified }.
Sizes 13 and 128 are special and correspond to binary fonts (no-antialiasing). Any other font size is rendered with anti-aliasing.
Specifying an empty target image resizes it to new dimensions such that the image contains the entire text string.
A custom font can be specified as a variable name that stores an image list of 256 or 512 items (512 for 256 character sprites + 256 associated opacities), or as an image selection that is a serialized version of such an image list.

Default values:

x=y=0.01~, font_height=16, opacity=1 and color1=0.

Examples of use:

• Example #1

image.jpg rescale2d ,600 div 2 y=0 repeat 30 { text {2*$>}" : This is a nice text!",10,$y,{2*$>},0.9,255 y+={2*$>} }

Command: image.jpg rescale2d ,600 div 2 y=0 repeat 30 { text {2*$>}" : This is a nice text!",10,$y,{2*$>},0.9,255 y+={2*$>} }

• Example #2

0 text "G'MIC",0,0,23,1,255

Command: 0 text "G'MIC",0,0,23,1,255
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.