Plan 9 from Bell Labs’s /usr/web/sources/contrib/pac/sys/doc/netpbm/ms/ppmtowinicon.ms

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TL
Ppmtowinicon User Manual
.SH 1
ppmtowinicon
.LP
Updated: 01 May 2004
.br
Table Of Contents
.SH 2
NAME
.LP
ppmtowinicon - convert PPM image into a Windows .ico file
.SH 2
SYNOPSIS
.LP
\fBppmtowinicon\fR
[\fB-andpgms\fR]
[\fB-output=\fR\fIoutput.ico\fR]
[\fIppmfile\fR [\fIandfile\fR] ...]
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
.LP
\fBppmtowinicon\fR reads one or more PPM images as input and
produces a Microsoft Windows .ico file as output.
.LP
A Windows icon contains 1 or more images, at different resolutions
and color depths.  When Windows wants to display the icon, it searches
through the images to find the one the best matches the number of colors
and resolution of the display.
.LP
Microsoft recommends including at least the following formats in each
icon.
.IP \(bu
16 x 16 - 4 bpp
.IP \(bu
32 x 32 - 4 bpp
.IP \(bu
48 x 48 - 8 bpp
.LP
.LP
If you don't specify any input files, input is from Standard Input.
.LP
Output is to Standard Output unless you specify \fB-output\fR.
.SH 3
Transparency
.LP
.LP
If you specify the \fB-andmask\fR option, you get (partly)
transparent icons.  In that case, your arguments are pairs of file
names, with the first file name being that of the image and the second
file name being that of a standard Netpbm PGM transparency mask (see
the pgm format specification).
.LP
In a .ico file, there is no such thing as partial transparency
(translucency).  Where the PGM mask says completely opaque, the icon will
be opaque.  Everywhere else, the icon will be transparent.  Note that
as with any Netpbm program, you can use a PBM image for the transparency
mask and \fBppmtowinicon\fR will treat it like a PGM.
.LP
The and mask is like an alpha mask, except for what it signifies in
the "not opaque" areas.  In the usual case, the foreground image is
black in those areas, and in that case the areas are fully transparent
-- the background shows through the icon.  But in general, a not
opaque pixel signifies that the background and foreground should be
merged as follows: The intensities of the color components in the
forgeground and background are represented as binary numbers, then
corresponding bits of the background and foreground intensities are
exlusive-or'ed together.  So there is a sort of reverse video effect.
.LP
If you don't want this special effect and instead want
straightforward transparency, use the \fB-truetransparent\fR option.
This causes \fBppmtowinicon\fR to make the base image black
everywhere your transparency mask says transparent, regardless of what
color you input image is at that location.
.LP
If you don't specify \fB-andmask\fR, \fBppmtowinicon\fR puts
all-opaque and masks into the .ico file.
.SH 2
OPTIONS
.LP
.RS
.IP "\fB-andpgms\fR"
Include transparency information in the icons.
See the transparency section.
.IP "\fB-output=\fR\fIoutput.ico\fR"
Name of output file.  By default, \fBppmtowinicon\fR writes the
icon to Standard Output.
.IP "\fB-truetransparent\fR"
Make transparency in the icon normal instead of the special reverse
video effect.  See the transparency section.
.RE
.SH 2
SEE ALSO
.LP
\fBwinicontoppm\fR,
\fBppm\fR
\fBpgm\fR
.SH 2
AUTHOR
.LP
Copyright (C) 2000 by Lee Benfield.
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
NAME
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
TRANSPARENCY
.LP
.IP \(bu
OPTIONS
.IP \(bu
SEE ALSO
.IP \(bu
AUTHOR
.LP

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.