|
Packit |
78deda |
|
|
Packit |
78deda |
<HTML><HEAD><TITLE>Ppmlabel User Manual</TITLE></HEAD>
|
|
Packit |
78deda |
<BODY>
|
|
Packit |
78deda |
|
|
Packit |
78deda |
ppmlabel
|
|
Packit |
78deda |
Updated: 15 April 2006
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Table Of Contents
|
|
Packit |
78deda |
|
|
Packit |
78deda |
NAME
|
|
Packit |
78deda |
ppmlabel - add text to a PPM image
|
|
Packit |
78deda |
|
|
Packit |
78deda |
SYNOPSIS
|
|
Packit |
78deda |
|
|
Packit |
78deda |
ppmlabel
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-angle angle]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-background { transparent | color } ]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-color color]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-file filename]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-size
|
|
Packit |
78deda |
|
|
Packit |
78deda |
textsize]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-text text_string]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-x column]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[-y row]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
...
|
|
Packit |
78deda |
|
|
Packit |
78deda |
[ppmfile]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
EXAMPLE
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
ppmlabel -x 50 -y 50 -text hello \
|
|
Packit |
78deda |
-angle -30 -text there \
|
|
Packit |
78deda |
testimg.ppm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
DESCRIPTION
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This program is part of Netpbm.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
ppmlabel uses the text drawing facilities of libnetpbm's
|
|
Packit |
78deda |
"ppmd" component to add text to a PBM image. You control
|
|
Packit |
78deda |
the location, size, baseline angle, color of the text, and background
|
|
Packit |
78deda |
color (if any) with command line arguments. You can specify the text
|
|
Packit |
78deda |
on the command line or supply it in files.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
You can add any number of separate labels in a single invocation of
|
|
Packit |
78deda |
ppmlabel, limited only by any restrictions your environment has
|
|
Packit |
78deda |
on the number and size of program arguments (e.g. a shell's command
|
|
Packit |
78deda |
size limit).
|
|
Packit |
78deda |
|
|
Packit |
78deda |
If you don't specify ppmfile, ppmlabel reads its input
|
|
Packit |
78deda |
PPM image from Standard Input.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
The output image goes to Standard Output.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
A more sophisticated way to add a label to an image is to use
|
|
Packit |
78deda |
pbmtext or pbmtextps to create an image of the text, then
|
|
Packit |
78deda |
pamcomp to overlay it onto the base image.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Another more general program is ppmdraw. It is slightly harder
|
|
Packit |
78deda |
to use for simple labelling.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
OPTIONS
|
|
Packit |
78deda |
|
|
Packit |
78deda |
The arguments on the ppmlabel command line are not options in
|
|
Packit |
78deda |
the strict sense; they are commands which control the placement and
|
|
Packit |
78deda |
appearance of the text being added to the input image. They are
|
|
Packit |
78deda |
executed left to right, and any number of arguments may appear.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
You can abbreviate any option to its shortest unique prefix.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-angle angle
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This option sets the angle of the baseline of subsequent text.
|
|
Packit |
78deda |
angle is an integral number of degrees, measured
|
|
Packit |
78deda |
counterclockwise from the row axis of the image.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-background { transparent | color }
|
|
Packit |
78deda |
|
|
Packit |
78deda |
If the argument is transparent, ppmlabel draws the
|
|
Packit |
78deda |
text over the existing pixels in the image. If you specify a
|
|
Packit |
78deda |
color (see the -color option below for information on
|
|
Packit |
78deda |
how to specify colors), ppmlabel generates background rectangles
|
|
Packit |
78deda |
enclosing subsequent text, and those rectangles are filled with that
|
|
Packit |
78deda |
color.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-color color
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This option sets the color for subsequent text.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Specify the color (color) as described for the
|
|
Packit |
78deda |
href="libppm.html#colorname">argument of the ppm_parsecolor()
|
|
Packit |
78deda |
library routine.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-colour is an acceptable alternate spelling.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-file filename
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This option causes ppmlabel to read lines of text from the file
|
|
Packit |
78deda |
named filename and draw it on successive lines.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-size textsize
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This option sets the height of the tallest characters above the
|
|
Packit |
78deda |
baseline to textsize pixels.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-text text_string
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This option causes ppmlabel to draw the specified text
|
|
Packit |
78deda |
string. It advances the location for subsequent text down 1.75 times
|
|
Packit |
78deda |
the current textsize. That lets you draw multiple lines of
|
|
Packit |
78deda |
text in a reasonable manner without specifying the position of each
|
|
Packit |
78deda |
line.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Note that if you invoke ppmlabel via a shell command and your
|
|
Packit |
78deda |
text string contains spaces, you'll have to quote it so the shell treats
|
|
Packit |
78deda |
the whole string as a single token. E.g.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
$ ppmlabel -text "this is my text" baseimage.ppm >annotatedimage.ppm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-x column
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This option sets the pixel column at which subsequent text will
|
|
Packit |
78deda |
be left justified. Depending on the shape of the first character, the
|
|
Packit |
78deda |
actual text may begin a few pixels to the right of this point.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-y row
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This option sets the pixel row which will form the baseline of
|
|
Packit |
78deda |
subsequent text. Characters with descenders, such as "y," will extend
|
|
Packit |
78deda |
below this line.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
LIMITATIONS
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Text strings are restricted to 7 bit ASCII. The text font used by
|
|
Packit |
78deda |
ppmlabel doesn't include definitions for 8 bit ISO 8859/1 characters.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
When drawing multiple lines of text with a non-transparent
|
|
Packit |
78deda |
background, it should probably fill the space between the lines with
|
|
Packit |
78deda |
the background color. This is tricky to get right when the text is
|
|
Packit |
78deda |
rotated to a non-orthogonal angle.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
SEE ALSO
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
ppmmake,
|
|
Packit |
78deda |
ppmdraw,
|
|
Packit |
78deda |
pbmtext,
|
|
Packit |
78deda |
pbmtextps,
|
|
Packit |
78deda |
pamcomp,
|
|
Packit |
78deda |
ppm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
AUTHOR
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Copyright (C) 1995 by John Walker (kelvin@fourmilab.ch)
|
|
Packit |
78deda |
WWW home page: http://www.fourmilab.ch/
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Permission to use, copy, modify, and distribute this software and
|
|
Packit |
78deda |
its documentation for any purpose and without fee is hereby granted,
|
|
Packit |
78deda |
without any conditions or restrictions. This software is provided
|
|
Packit |
78deda |
``as is'' without express or implied warranty.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Table Of Contents
|
|
Packit |
78deda |
|
|
Packit |
78deda |
SYNOPSIS
|
|
Packit |
78deda |
EXAMPLE
|
|
Packit |
78deda |
DESCRIPTION
|
|
Packit |
78deda |
OPTIONS
|
|
Packit |
78deda |
LIMITATIONS
|
|
Packit |
78deda |
SEE ALSO
|
|
Packit |
78deda |
AUTHOR
|
|
Packit |
78deda |
|
|
Packit |
78deda |
</BODY>
|
|
Packit |
78deda |
</HTML>
|