1Ppmlabel User Manual(0)                                Ppmlabel User Manual(0)
2
3
4

NAME

6       ppmlabel - add text to a PPM image
7
8

SYNOPSIS

10       ppmlabel
11
12       [-angle angle]
13
14       [-background { transparent | color } ]
15
16       [-color color]
17
18       [-file filename]
19
20       [-size
21
22       textsize]
23
24       [-text text_string]
25
26       [-x column]
27
28       [-y row]
29
30       ...
31
32       [ppmfile]
33
34
35

EXAMPLE

37           ppmlabel -x 50 -y 50 -text hello \
38                    -angle -30 -text there \
39                    testimg.ppm
40
41

DESCRIPTION

43       This program is part of Netpbm(1).
44
45       ppmlabel  uses the text drawing facilities of libnetpbm's 'ppmd' compo‐
46       nent to add text to a PBM image.  You control the location, size, base‐
47       line  angle, color of the text, and background color (if any) with com‐
48       mand line arguments.  You can specify the text on the command  line  or
49       supply it in files.
50
51       You  can  add  any  number of separate labels in a single invocation of
52       ppmlabel, limited only by any restrictions your environment has on  the
53       number  and  size  of  program  arguments  (e.g. a shell's command size
54       limit).
55
56       If you don't specify ppmfile, ppmlabel reads its input PPM  image  from
57       Standard Input.
58
59       The output image goes to Standard Output.
60
61       A  more  sophisticated way to add a label to an image is to use pbmtext
62       or pbmtextps to create an image of the text, then pamcomp to overlay it
63       onto the base image.
64
65       Another  more general program is ppmdraw.  It is slightly harder to use
66       for simple labelling.
67
68

OPTIONS

70       The arguments on the ppmlabel command  line  are  not  options  in  the
71       strict sense; they are commands which control the placement and appear‐
72       ance of the text being added to the input  image.   They  are  executed
73       left to right, and any number of arguments may appear.
74
75       You can abbreviate any option to its shortest unique prefix.
76
77
78
79       -angle angle
80              This  option  sets the angle of the baseline of subsequent text.
81              angle is an integral number of degrees,  measured  counterclock‐
82              wise from the row axis of the image.
83
84
85       -background { transparent | color }
86              If the argument is transparent, ppmlabel draws the text over the
87              existing pixels in the image.  If you specify a color  (see  the
88              -color  option  below for information on how to specify colors),
89              ppmlabel generates background  rectangles  enclosing  subsequent
90              text, and those rectangles are filled with that color.
91
92
93       -color color
94              This option sets the color for subsequent text.
95
96              Specify  the  color (color) as described for the argument of the
97              ppm_parsecolor() library routine ⟨libppm.html#colorname⟩ .
98
99              -colour is an acceptable alternate spelling.
100
101
102       -file filename
103              This option causes ppmlabel to read lines of text from the  file
104              named filename and draw it on successive lines.
105
106
107       -size textsize
108              This  option sets the height of the tallest characters above the
109              baseline to textsize pixels.
110
111
112       -text text_string
113              This option causes ppmlabel to draw the specified  text  string.
114              It advances the location for subsequent text down 1.75 times the
115              current textsize.  That lets you draw multiple lines of text  in
116              a  reasonable  manner  without  specifying  the position of each
117              line.
118
119              Note that if you invoke ppmlabel via a shell  command  and  your
120              text  string  contains  spaces,  you'll  have to quote it so the
121              shell treats the whole string as a single token.  E.g.
122                $ ppmlabel -text "this is my text" baseimage.ppm >annotatedimage.ppm
123
124
125
126       -x column
127              This option sets the pixel column at which subsequent text  will
128              be  left justified.  Depending on the shape of the first charac‐
129              ter, the actual text may begin a few pixels to the right of this
130              point.
131
132
133       -y row This  option  sets the pixel row which will form the baseline of
134              subsequent text.  Characters with descenders, such as "y,"  will
135              extend below this line.
136
137
138
139

LIMITATIONS

141       Text strings are restricted to 7 bit ASCII.  The text font used by ppm‐
142       label doesn't include definitions for 8 bit ISO 8859/1 characters.
143
144       When drawing multiple lines of text with a non-transparent  background,
145       it should probably fill the space between the lines with the background
146       color.  This is tricky to get right when the text is rotated to a  non-
147       orthogonal angle.
148
149

SEE ALSO

151       ppmmake(1), ppmdraw(1), pbmtext(1), pbmtextps(1), pamcomp(1), ppm(1)
152
153
154

AUTHOR

156       Copyright  (C) 1995 by John Walker (kelvin@fourmilab.ch) WWW home page:
157       http://www.fourmilab.ch/http://www.fourmilab.ch/
158
159       Permission to use, copy, modify, and distribute this software  and  its
160       documentation  for any purpose and without fee is hereby granted, with‐
161       out any conditions or restrictions.  This  software  is  provided  ``as
162       is'' without express or implied warranty.
163
164
165
166netpbm documentation             15 April 2006         Ppmlabel User Manual(0)
Impressum