|
|
| |
ppmcaption(1) |
FreeBSD General Commands Manual |
ppmcaption(1) |
ppmcaption - add text captions to PPM, PGM, or PBM images
ppmcaption [-font bdf-file] [-scale float] [-blur
int] [-opacity float] [-fg color] [-bg color]
[-pos x y] [-left] [-right] [-center] [-text string]
The ppmcaption program adds text to a PPM, PGM, or PBM image. Multiple
blocks of text can be placed on the image, with varying fonts, font sizes,
colors, and transparency.
ppmcaption accepts the following options:
- -font filename
- Specifies a BDF font file to load. If a default font was built in to the
program at compile-time, the default is to use that. Otherwise this must
be the name of a file in Adobe Binary Distribution Format that specifies a
bitmap font, and it must be specified before the first -text
argument.
If there is a builtin font, you can reload it with -font
builtin.
- -scale float
- Scale the currently-selected font up or down by the given ratio, e.g., 0.5
divides the font size in half. When scaling down, the font will be nicely
anti-aliased onto the background image. However, when scaling up (>
1.0), the font will get pixellated.
Note that -scale operations are cumulative: for
cleanest results, it's best to reload the font (with -font)
before re-scaling.
- -blur integer
- Add an N pixel halo around the currently selected font, so that it is
visible on both light and dark backgrounds. The font will be in the
current foreground color, and the halo in the background color.
It tends to look better to scale then blur, rather than
the other way around.
Like -scale, -blur operations are
cumulative.
Note that large blur values are pretty slow.
- -opacity float
- How transparent to draw the next block of text. 0.0 means invisible, 1.0
means solid.
- -fg color
- Foreground color of next block of text. Default is black.
- -bg color
- Background color (color of blur halo). Default is white.
A small number of color names are supported
("black", "white", etc.) or hexadecimal triplets of
the form "#RRGGBB" may be used.
- -pos X Y
- Where to position the next block of text. Positive numbers are measured
from the upper left of the image; Negative numbers are measured from the
bottom right of the image. So "-10" means near the right (or
bottom) edge, regardless of the image size.
- -left
- The next block of text will be flush-left, that is, have its left edge at
the current position (this is the default.)
- -right
- The next block of text will be flush-right, that is, have its right edge
at the current position.
- -center
- The next block of text will be centered on top of the current position.
Note that this only applies to the X position, not Y: multi-line text is
also centered on X, but grows down.
- -text string
- Place the given text in the image at the current position and in the
current font. Newlines are allowed; tabs are not handled.
If the text contains percent (%) characters, they are
interpreted as for strftime(3), so you can easily put
timestamps into images.
- -time time_t
- This sets the time which will be formatted by percent directives in the
-text arguments. It defaults to the current time, but you can make
it be the write-date of the input file by saying -time file,
or can set it to a specific time by specifying a number of seconds after
the Epoch (Jan 1, 1970.)
See http://www.jwz.org/ppmcaption/ for updates.
You can find some common fonts in BDF form here:
http://ftp.x.org/pub/R6.4/xc/fonts/bdf/100dpi/
Copyright © 2001, 2002 by Jamie Zawinski. Permission to use, copy,
modify, distribute, and sell this software and its documentation for any
purpose is hereby granted without fee, provided that the above copyright
notice appear in all copies and that both that copyright notice and this
permission notice appear in supporting documentation. No representations are
made about the suitability of this software for any purpose. It is provided
"as is" without express or implied warranty.
Jamie Zawinski <jwz@jwz.org>, 22-May-2001
Visit the GSP FreeBSD Man Page Interface. Output converted with ManDoc. |