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
42

DESCRIPTION

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

OPTIONS

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

LIMITATIONS

149       Text strings are restricted to 7 bit ASCII.  The text font used by ppm‐
150       label doesn't include definitions for 8 bit ISO 8859/1 characters.
151
152       When  drawing multiple lines of text with a non-transparent background,
153       it should probably fill the space between the lines with the background
154       color.   This is tricky to get right when the text is rotated to a non-
155       orthogonal angle.
156
157

SEE ALSO

159       ppmmake(1), ppmdraw(1), pbmtext(1), pbmtextps(1), pamcomp(1), ppm(1)
160
161
162

AUTHOR

164       Copyright (C) 1995 by John Walker (kelvin@fourmilab.ch) WWW home  page:
165       http://www.fourmilab.ch/http://www.fourmilab.ch/
166
167       Permission  to  use, copy, modify, and distribute this software and its
168       documentation for any purpose and without fee is hereby granted,  with‐
169       out  any  conditions  or  restrictions.  This software is provided ``as
170       is'' without express or implied warranty.
171

DOCUMENT SOURCE

173       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
174       source.  The master documentation is at
175
176              http://netpbm.sourceforge.net/doc/ppmlabel.html
177
178netpbm documentation             15 April 2006         Ppmlabel User Manual(0)
Impressum