summary refs log tree commit diff
path: root/ppmtowinicon.html
blob: 41fd9af874c4bc95b13aff40b167e0eb213adb6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmtowinicon User Manual</title></head>
<body>
<h1>ppmtowinicon</h1>
Updated: 01 May 2004
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>
ppmtowinicon - convert PPM image into a Windows .ico file

<h2 id="synopsis">SYNOPSIS</h2>

<b>ppmtowinicon</b>

[<b>-andpgms</b>]

[<b>-output=</b><i>output.ico</i>]

[<i>ppmfile</i> [<i>andfile</i>] ...]

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p>This program is essentially obsolete; The newer <b>pamtowinicon</b> is
better.

<p><b>ppmtowinicon</b> reads one or more PPM images as input and
produces a Microsoft Windows .ico file as output.

<p>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 that best matches the number of colors
and resolution of the display.

<p>Microsoft recommends including at least the following formats in each
icon.

<ul>
<li>16 x 16 - 4 bpp
<li>32 x 32 - 4 bpp
<li>48 x 48 - 8 bpp
</ul>

<p>If you don't specify any input files, input is from Standard Input.

<p>Output is to Standard Output unless you specify <b>-output</b>.

<h3 id="transparency">Transparency</h3>

<p>If you specify the <b>-andmask</b> 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 <a href="pgm.html">pgm format specification</a>).

<p>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 <b>ppmtowinicon</b> will treat it like a PGM.

<p>The and mask is like a transparency 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
foreground and background are represented as binary numbers, then
corresponding bits of the background and foreground intensities are
exclusive-or'ed together.  So there is a sort of reverse video effect.

<p>If you don't want this special effect and instead want
straightforward transparency, use the <b>-truetransparent</b> option.
This causes <b>ppmtowinicon</b> to make the base image black
everywhere your transparency mask says transparent, regardless of what
color your input image is at that location.

<p>If you don't specify <b>-andmask</b>, <b>ppmtowinicon</b> puts
all-opaque and masks into the .ico file.

<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>ppmtowinicon</b> recognizes the following
command line options:

<dl compact>
<dt><b>-andpgms</b>

<dd>Include transparency information in the icons.
See the <a href="#transparency">transparency section</a>.
     
<dt><b>-output=</b><i>output.ico</i>

<dd>Name of output file.  By default, <b>ppmtowinicon</b> writes the
icon to Standard Output.

<dt><b>-truetransparent</b>

<dd>Make transparency in the icon normal instead of the special reverse
video effect.  See the <a href="#transparency">transparency section</a>.
     
</dl>

<h2 id="seealso">SEE ALSO</h2>

<b><a href="pamtowinicon.html">pamtowinicon</a></b>,
<b><a href="winicontoppm.html">winicontoppm</a></b>,
<b><a href="ppm.html">ppm</a></b>
<b><a href="pgm.html">pgm</a></b>

<h2 id="author">AUTHOR</h2>

Copyright (C) 2000 by Lee Benfield.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
  <ul>
  <li><a href="#transparency">Transparency</a>
  </ul>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>