summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-leap-15-6/man1/pamtowinicon.1
blob: 15065db4b39cd92c050d8c294f9ee2cd2d56d0fb (plain)
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pamtowinicon User Manual" 0 "12 April 2013" "netpbm documentation"

.UN name
.SH NAME

pamtowinicon - convert Netpbm PAM images to a Microsoft Windows icon file

.UN synopsis
.SH SYNOPSIS

\fBpamtowinicon\fP
[\fB-pngthreshold=\fP\fIthreshold\fP]
[\fB-truetransparent\fP]
[\fB-verbose\fP]
[\fIpam_file\fP]
.PP
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.

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpamtowinicon\fP reads an RGB_ALPHA Netpbm PAM file and converts it to a
Microsoft Windows icon file.
.PP
The output goes to Standard Output.
.PP
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 \fBcat\fP and pass the result to \fBpamtowinicon\fP.


.UN options
.SH OPTIONS

In addition to the options common to all programs based on libnetpbm (most
notably \fB-quiet\fP, see 
.UR index.html#commonoptions
Common Options
.UE
\&), \fBpamtowinicon\fP recognizes the following command
line options:


.TP
\fB-pngthreshold=\fP\fIthreshold\fP
\fBpamtowinicon\fP encodes images with resolutions above or equal \fIthreshold\fP by \fIthreshold\fP as PNG by running
.BR "\fBpnmtopng\fP" (1)\c
\&.  Other images it encodes
using the more traditional BMP format.
.sp
When the program uses PNG encoding for a 5-channel PAM with separate AND mask (see below), it discards the AND mask.
.sp
The default value for \fIthreshold\fP is 128.

.TP
\fB-truetransparent\fP
Make all pixels outside the opaque area black, avoiding inversion
and other effects on the background of the image
(see
.BR "Windows Icons" (1)\c
\&).

.TP
\fB-verbose\fP
Print more messages




.UN images
.SH IMAGES
.PP
\fBpamtowinicon\fP reads a (multi-image) Netpbm PAM file
as input and outputs an single Windows icon file containing those images.
.PP
The images in the icon file are in the same order as in the PAM input.


.UN paminput
.SS PAM Input
.PP
\fBpamtowinicon\fP interprets the PAM images as follows, based on
the number of channels.

.TS
l l.
_
channels	image
1	fully opaque grayscale image
2	grayscale image with transparency channel
3	fully opaque color image
4	color image with transparency channel
5	color image with transparency channel and additional AND
mask
.TE
.PP
The tuple types of the PAMs are irrelevant.


.UN andmask
.SS AND Mask

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 transparency channel, but it is also
used for e.g. shading the icon while dragging.  See
.BR "Windows Icons" (1)\c
\& for details.
.PP
If there is no explicit AND mask, but transparency data in the
input image, \fBpamtowinicon\fP sets the AND mask to opaque where the
sample in the transparency channel is below maxval, and to transparent
elsewhere.
.PP
If no transparency data is present in the input image,
\fBpamtowinicon\fP assumes the whole image to be fully opaque.


.UN bmpoutput
.SS BMP Output

When BMP encoding an image, \fBpamtowinicon\fP tries to use the most
compact \fBBI_RGB\fP format allowed for icon images with a color
depth of eight bits per channel.
.PP
\fBpamtowinicon\fP generates neither 16-bit \fBBI_RGB\fP nor
\fBBI_BITFIELDS\fP BMP encoded images, even if the maxval of the input
PAM is not 255.


.UN seealso
.SH SEE ALSO


.IP \(bu

.BR "\fBwinicontopam\fP" (1)\c
\&
.IP \(bu

.BR "\fBppmtowinicon\fP" (1)\c
\&
.IP \(bu

.BR "pam" (5)\c
\&
.IP \(bu

.BR "Windows Icons" (1)\c
\&

.PP
For information on the PNG format, see
.UR http://schaik.com/png
http://schaik.com/png
.UE
\&.


.UN history
.SH HISTORY
.PP
\fBpamtowinicon\fP was new in Netpbm 10.63 (June 2013).  It obsoleted
\fBppmtowinicon\fP by providing more function and conforming better to
Netpbm conventions.


.UN author
.SH AUTHOR
.PP
Copyright (C) 2013 by Ludolf Holzheid.
.PP
Translated to Netpbm coding style by Bryan Henderson.
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pamtowinicon.html
.PP