1Ppmlabel User Manual(0) Ppmlabel User Manual(0)
2
3
4
6 ppmlabel - add text to a PPM image
7
8
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
37 ppmlabel -x 50 -y 50 -text hello \
38 -angle -30 -text there \
39 testimg.ppm
40
41
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
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 pnm_parsecolor() library routine
98 ⟨libnetpbm_image.html#colorname⟩ .
99
100 -colour is an acceptable alternate spelling.
101
102
103 -file filename
104 This option causes ppmlabel to read lines of text from the file
105 named filename and draw it on successive lines.
106
107
108 -size textsize
109 This option sets the height of the tallest characters above the
110 baseline to textsize pixels.
111
112
113 -text text_string
114 This option causes ppmlabel to draw the specified text string.
115 It advances the location for subsequent text down 1.75 times the
116 current textsize. That lets you draw multiple lines of text in
117 a reasonable manner without specifying the position of each
118 line.
119
120 Note that if you invoke ppmlabel via a shell command and your
121 text string contains spaces, you'll have to quote it so the
122 shell treats the whole string as a single token. E.g.
123 $ ppmlabel -text "this is my text" baseimage.ppm >annotatedimage.ppm
124
125
126
127 -x column
128 This option sets the pixel column at which subsequent text will
129 be left justified. Depending on the shape of the first charac‐
130 ter, the actual text may begin a few pixels to the right of this
131 point.
132
133
134 -y row This option sets the pixel row which will form the baseline of
135 subsequent text. Characters with descenders, such as "y," will
136 extend below this line.
137
138
139
140
142 Text strings are restricted to 7 bit ASCII. The text font used by ppm‐
143 label doesn't include definitions for 8 bit ISO 8859/1 characters.
144
145 When drawing multiple lines of text with a non-transparent background,
146 it should probably fill the space between the lines with the background
147 color. This is tricky to get right when the text is rotated to a non-
148 orthogonal angle.
149
150
152 ppmmake(1), ppmdraw(1), pbmtext(1), pbmtextps(1), pamcomp(1), ppm(1)
153
154
155
157 Copyright (C) 1995 by John Walker (kelvin@fourmilab.ch) WWW home page:
158 http://www.fourmilab.ch/ ⟨http://www.fourmilab.ch/⟩
159
160 Permission to use, copy, modify, and distribute this software and its
161 documentation for any purpose and without fee is hereby granted, with‐
162 out any conditions or restrictions. This software is provided ``as
163 is'' without express or implied warranty.
164
166 This manual page was generated by the Netpbm tool 'makeman' from HTML
167 source. The master documentation is at
168
169 http://netpbm.sourceforge.net/doc/ppmlabel.html
170
171netpbm documentation 15 April 2006 Ppmlabel User Manual(0)