Debian Codegraph @

upstream/debian-unstable/man1/winicon.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Windows Icons" 1 "12 April 2013" "netpbm documentation"
7
8 .SH NAME
9
10 Microsoft Windows icon files
11
12 .UN description
13 .SH DESCRIPTION
14 .PP
15 A Microsoft Windows icon file contains one or more images, at
16 resolutions up to 256 by 256 pixels and various bpp values. The
17 images are encoded either as Portable Network Graphics file (PNG), or
18 in a format similar to Microsoft's BMP format.
19 .PP
20 If encoded as BMP, the image includes an "AND mask",
21 which contains 1-bit transparency data. It may also contain
22 additional 8-bit transparency data together with the color
23 information.
24
25 .UN colordepth
26 .SS Color Depth
27
28 Except for the 16 bits per pixel images and images with bit fields, which both
29 are rare, the colors in all BMP encoded images are RGB with 8 bits per
30 channel. Images with bpp values lower than 16 use a palette.
31 .PP
32 I.e. the bpp value gives the number of distinct colors, not the color
33 depth.
34
35
36 .UN masks
37 .SS XOR Mask and AND Mask
38 .PP
39 BMP encoded images contain two pixel maps: The so-called "XOR
40 mask" stores the color information for each pixel, and the
41 "AND mask" stores the transparency belonging to it.
42 .PP
43 The names and the function of these maps are most easily
44 understood by looking at how a 1-bpp icon image is rendered on a
45 monochrome screen: The pixels on the screen are logically AND-ed with
46 the bits on the AND mask, then the result is logically XOR-ed with the
47 bits on the XOR mask.
48 .PP
49 The result is that if a bit on the AND mask is reset, the corresponding bit
50 on the XOR mask determines the color of the pixel on the screen. If a bit in
51 the AND mask is set and the corresponding bit in the XOR mask is black
52 (reset), the image is transparent. Finally, if the bits are set in both the
53 AND and XOR mask (the pixel on the XOR mask is white), the background of the
54 screen is inverted.
55 .PP
56 In color environments, a pixel on the XOR mask outside the opaque area of
57 the image is usually black and sometimes white, but a color other than black
58 and white will hardly give predictable results.
59 .PP
60 Since Windows XP, there may also be an 8-bit transparency channel in 32-bpp
61 BMP encoded icon images. The AND mask, however, is still required and used
62 e.g. for generating shadows.
63 .PP
64 PNG encoded images don't contain AND masks. While rendering a PNG encoded
65 image, Windows constructs an AND mask on the fly from the transparency
66 channel, if present.
67
68
69 .UN evolution
70 .SS Evolution of Windows Icons
71 .PP
72 The Windows icon file format has undergone some extensions since it was
73 invented in the mid-eighties for Windows\ 1:
74
75
76 .IP \(bu
77 Windows\ 1 used monochrome 32x32 icons only.
78 .IP \(bu
79 Windows\ 3.0 added color icons with bpp values up to 8.
80 .IP \(bu
81 Windows 4.0 (a.k.a. Windows95) added option for 32-bpp images and
82 resolutions up to 256 by 256.
83 .IP \(bu
84 NT\ 5.1 (a.k.a. Windows\ XP) added option for the 8-bit
85 transparency channel in the unused bits of 32-bpp images.
86 .IP \(bu
87 NT\ 6.0 (a.k.a. Windows\ Vista) added option for PNG
88 encoded images
89
90
91 .UN resolutions
92 .SS Common Resolutions and BPP Values
93 .PP
94 Typical resolutions and bpp values of the Windows shell icons include:
95
96 .TS
97 l l l.
98 _
99 OS resolutions bpp values
100 Windows\ 3 32x32 1, 4
101
102 Windows\ 4 16x16, 32x32, 48x48 4, 8
103 NT\ 5 16x16, 32x32, 48x48 4, 8, 32
104 NT\ 6 16x16, 32x32, 48x48 4, 8, 32
105 24x24, 96x96 8, 32
106
107 256x256 32 (PNG encoded)
108
109 .TE
110 .PP
111 Within the icon file, the images with low bpp values are usually
112 stored first. With the same bpp value, the images are sorted by
113 resolution, large images first.
114
115
116 .UN mimetype
117 .SS MIME Type and File Name Extension
118 .PP
119 The MIME type of Windows icon files is registered by IANA as
120 \fBimage/vnd.microsoft.icon\fP, but the unofficial name
121 \fBimage/x-icon\fP is still widely used.
122 .PP
123 The file name extension (used by Microsoft operating systems as
124 file type identifier) is \fB.ico\fP.
125 .SH DOCUMENT SOURCE
126 This manual page was generated by the Netpbm tool 'makeman' from HTML
127 source. The master documentation is at
128 .IP
129 .B http://netpbm.sourceforge.net/doc/winicon.html
130 .PP