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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pamtowinicon User Manual</TITLE></HEAD>
<BODY>
<H1>pamtowinicon</H1>
Updated: 12 April 2013
<BR>
<A HREF="#index">Table of Contents</A>
<H2 id="name">NAME</H2>
pamtowinicon - convert Netpbm PAM images to a Microsoft Windows icon file
<H2 id="synopsis">SYNOPSIS</H2>
<B>pamtowinicon</B>
[<B>-pngthreshold=</B><I>threshold</I>]
[<B>-truetransparent</B>]
[<B>-verbose</B>]
[<I>pam_file</I>]
<P>All options can be abbreviated to their shortest unique prefix.
You may use two hyphens instead of one to designate an option. You
may use either white space or equals signs between an option name and
its value.
<H2 id="description">DESCRIPTION</H2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<P><B>pamtowinicon</B> reads an RGB_ALPHA Netpbm PAM file and converts it to a
Microsoft Windows icon file.
<P>The output goes to Standard Output.
<p>The input is a multi-image PAM file; each image becomes an icon in the
output file. If you have input images in multiple files, you can simply
combine them with <b>cat</b> and pass the result to <b>pamtowinicon</b>.
<H2 id="options">OPTIONS</H2>
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>pamtowinicon</B> recognizes the following command
line options:
<DL COMPACT>
<DT><B>-pngthreshold=</B><I>threshold</I>
<DD><b>pamtowinicon</b> encodes images with resolutions above or equal <I>threshold</I> by <I>threshold</I> as PNG by running
<A HREF="pnmtopng.html"><b>pnmtopng</b></A>. Other images it encodes
using the more traditional BMP format.
<P>When the program uses PNG encoding for a 5-channel PAM with separate AND mask (see below), it discards the AND mask.
<P>The default value for <I>threshold</I> is 128.
<DT><B>-truetransparent</B>
<DD>Make all pixels outside the opaque area black, avoiding inversion
and other effects on the background of the image
(see <A HREF="winicon.html">Windows Icons</A>).
<DT><B>-verbose</B>
<DD>Print more messages
</DL>
<H2 id="images">IMAGES</H2>
<p><B>pamtowinicon</B> reads a (multi-image) Netpbm PAM file
as input and outputs an single Windows icon file containing those images.
<p>The images in the icon file are in the same order as in the PAM input.
<H3 id="paminput">PAM Input</H3>
<p>
<b>pamtowinicon</b> interprets the PAM images as follows, based on
the number of channels.
<TABLE summary="Image type based on number of channels" border=1 align="center">
<TR><TH>channels</TH><TH>image</TH></TR>
<TR><TD>1</TD><TD>fully opaque grayscale image</TD></TR>
<TR><TD>2</TD><TD>grayscale image with alpha channel</TD></TR>
<TR><TD>3</TD><TD>fully opaque color image</TD></TR>
<TR><TD>4</TD><TD>color image with alpha channel</TD></TR>
<TR><TD>5</TD><TD>color image with alpha channel and additional AND mask</TD></TR>
</TABLE>
<P>The tuple types of the PAMs are irrelevant.
<H3 id="andmask">AND Mask</H3>
The so-called ‘AND mask’ is a special feature of Microsoft
Windows icons. It is required for all BMP encoded images. At the
first sight, the AND mask is a 1-bit alpha channel, but it is also
used for e.g. shading the icon while dragging. See
<A HREF="winicon.html">Windows Icons</A> for details.
<P>If there is no explicit AND mask, but transparency data in the
input image, <B>pamtowinicon</B> sets the AND mask to opaque where the
sample in the alpha channel is below maxval, and to transparent
elsewhere.
<P>If no transparency data is present in the input image,
<B>pamtowinicon</B> assumes the whole image to be fully opaque.
<H3 id="bmpoutput">BMP Output</H3>
When BMP encoding an image, <B>pamtowinicon</B> tries to use the most
compact <B>BI_RGB</B> format allowed for icon images with a color
depth of eight bits per channel.
<P><B>pamtowinicon</B> generates neither 16-bit <B>BI_RGB</B> nor
<B>BI_BITFIELDS</B> BMP encoded images, even if the maxval of the input
PAM is not 255.
<H2 id="seealso">SEE ALSO</H2>
<ul>
<li><A HREF="winicontopam.html"><b>winicontopam</b></A>
<li><A HREF="ppmtowinicon.html"><b>ppmtowinicon</b></A>
<li><A HREF="pam.html">pam</A>
<li><A HREF="winicon.html">Windows Icons</A>
</ul>
<p>For information on the PNG format, see
<a href="http://schaik.com/png">http://schaik.com/png</a>.
<h2 id="history">HISTORY</h2>
<p><b>pamtowinicon</b> was new in Netpbm 10.63 (June 2013). It obsoleted
<b>ppmtowinicon</b> by providing more function and conforming better to
Netpbm conventions.
<H2 id="author">AUTHOR</H2>
<p>Copyright (C) 2013 by Ludolf Holzheid.
<p>Translated to Netpbm coding style by Bryan Henderson.
<HR>
<H2 id="index">Table Of Contents</H2>
<UL>
<LI><A HREF="#synopsis">SYNOPSIS</A>
<LI><A HREF="#description">DESCRIPTION</A>
<LI><A HREF="#options">OPTIONS</A>
<LI><A HREF="#images">IMAGES</A>
<UL>
<LI><A HREF="#paminput">PAM Input</A>
<LI><A HREF="#andmask">AND Mask</A>
<LI><A HREF="#bmpoutput">BMP Output</A>
</UL>
<LI><A HREF="#seealso">SEE ALSO</A>
<LI><A HREF="#history">HISTORY</A>
<LI><A HREF="#author">AUTHOR</A>
</UL>
</BODY>
</HTML>
|