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 In addition to the options common to all programs based on libnetpbm
71 (most notably -quiet, see
72 Common Options ⟨index.html#commonoptions⟩ ), ppmlabel recognizes the
73 following command line options:
74
75 The arguments on the ppmlabel command line are not options in the
76 strict sense; they are commands which control the placement and appear‐
77 ance of the text being added to the input image. They are executed
78 left to right, and any number of arguments may appear.
79
80 You can abbreviate any option to its shortest unique prefix.
81
82
83
84 -angle angle
85 This option sets the angle of the baseline of subsequent text.
86 angle is an integral number of degrees, measured counterclock‐
87 wise from the row axis of the image.
88
89
90 -background { transparent | color }
91 If the argument is transparent, ppmlabel draws the text over the
92 existing pixels in the image. If you specify a color (see the
93 -color option below for information on how to specify colors),
94 ppmlabel generates background rectangles enclosing subsequent
95 text, and those rectangles are filled with that color.
96
97
98 -color color
99 This option sets the color for subsequent text.
100
101 Specify the color (color) as described for the argument of the
102 pnm_parsecolor() library routine
103 ⟨libnetpbm_image.html#colorname⟩ .
104
105 -colour is an acceptable alternate spelling.
106
107
108 -file filename
109 This option causes ppmlabel to read lines of text from the file
110 named filename and draw it on successive lines.
111
112
113 -size textsize
114 This option sets the height of the tallest characters above the
115 baseline to textsize pixels.
116
117
118 -text text_string
119 This option causes ppmlabel to draw the specified text string.
120 It advances the location for subsequent text down 1.75 times the
121 current textsize. That lets you draw multiple lines of text in
122 a reasonable manner without specifying the position of each
123 line.
124
125 Note that if you invoke ppmlabel via a shell command and your
126 text string contains spaces, you'll have to quote it so the
127 shell treats the whole string as a single token. E.g.
128 $ ppmlabel -text "this is my text" baseimage.ppm >annotatedimage.ppm
129
130
131
132 -x column
133 This option sets the pixel column at which subsequent text will
134 be left justified. Depending on the shape of the first charac‐
135 ter, the actual text may begin a few pixels to the right of this
136 point.
137
138
139 -y row This option sets the pixel row which will form the baseline of
140 subsequent text. Characters with descenders, such as "y," will
141 extend below this line.
142
143
144
145
147 Text strings are restricted to 7 bit ASCII. The text font used by ppm‐
148 label doesn't include definitions for 8 bit ISO 8859/1 characters.
149
150 When drawing multiple lines of text with a non-transparent background,
151 it should probably fill the space between the lines with the background
152 color. This is tricky to get right when the text is rotated to a non-
153 orthogonal angle.
154
155
157 ppmmake(1), ppmdraw(1), pbmtext(1), pbmtextps(1), pamcomp(1), ppm(1)
158
159
160
162 Copyright (C) 1995 by John Walker (kelvin@fourmilab.ch) WWW home page:
163 http://www.fourmilab.ch/ ⟨http://www.fourmilab.ch/⟩
164
165 Permission to use, copy, modify, and distribute this software and its
166 documentation for any purpose and without fee is hereby granted, with‐
167 out any conditions or restrictions. This software is provided ``as
168 is'' without express or implied warranty.
169
171 This manual page was generated by the Netpbm tool 'makeman' from HTML
172 source. The master documentation is at
173
174 http://netpbm.sourceforge.net/doc/ppmlabel.html
175
176netpbm documentation 15 April 2006 Ppmlabel User Manual(0)