1Windows Icons(1)            General Commands Manual           Windows Icons(1)
2
3
4

NAME

6       Microsoft Windows icon files
7
8

DESCRIPTION

10       A  Microsoft  Windows icon file contains one or more images, at resolu‐
11       tions up to 256 by 256 pixels and various bpp values.  The  images  are
12       encoded  either as Portable Network Graphics file (PNG), or in a format
13       similar to Microsoft's BMP format.
14
15       If encoded as BMP, the image includes an  "AND  mask",  which  contains
16       1-bit  transparency  data.  It may also contain additional 8-bit trans‐
17       parency data together with the color information.
18
19
20   Color Depth
21       Except for the 16 bits per pixel images and  images  with  bit  fields,
22       which  both are rare, the colors in all BMP encoded images are RGB with
23       8 bits per channel.  Images with bpp values lower than 16  use  a  pal‐
24       ette.
25
26       I.e.  the  bpp value gives the number of distinct colors, not the color
27       depth.
28
29
30
31   XOR Mask and AND Mask
32       BMP encoded images contain two pixel maps:  The  so-called  "XOR  mask"
33       stores  the color information for each pixel, and the "AND mask" stores
34       the transparency belonging to it.
35
36       The names and the function of these maps are most easily understood  by
37       looking  at  how a 1-bpp icon image is rendered on a monochrome screen:
38       The pixels on the screen are logically AND-ed with the bits on the  AND
39       mask,  then  the  result  is  logically XOR-ed with the bits on the XOR
40       mask.
41
42       The result is that if a bit on the AND mask is reset, the corresponding
43       bit  on  the  XOR mask determines the color of the pixel on the screen.
44       If a bit in the AND mask is set and the corresponding bit  in  the  XOR
45       mask  is black (reset), the image is transparent.  Finally, if the bits
46       are set in both the AND and XOR mask (the pixel  on  the  XOR  mask  is
47       white), the background of the screen is inverted.
48
49       In  color environments, a pixel on the XOR mask outside the opaque area
50       of the image is usually black and sometimes white, but  a  color  other
51       than black and white will hardly give predictable results.
52
53       Since  Windows  XP,  there may also be an 8-bit transparency channel in
54       32-bpp BMP encoded  icon  images.  The  AND  mask,  however,  is  still
55       required and used e.g. for generating shadows.
56
57       PNG  encoded  images  don't  contain  AND masks.  While rendering a PNG
58       encoded image, Windows constructs an AND  mask  on  the  fly  from  the
59       transparency channel, if present.
60
61
62
63   Evolution of Windows Icons
64       The Windows icon file format has undergone some extensions since it was
65       invented in the mid-eighties for Windows 1:
66
67
68
69       ·      Windows 1 used monochrome 32x32 icons only.
70
71       ·      Windows 3.0 added color icons with bpp values up to 8.
72
73       ·      Windows 4.0 (a.k.a. Windows95) added option  for  32-bpp  images
74              and resolutions up to 256 by 256.
75
76       ·      NT 5.1  (a.k.a.  Windows XP)  added  option for the 8-bit trans‐
77              parency channel in the unused bits of 32-bpp images.
78
79       ·      NT 6.0 (a.k.a.  Windows Vista)  added  option  for  PNG  encoded
80              images
81
82
83
84   Common Resolutions and BPP Values
85       Typical resolutions and bpp values of the Windows shell icons include:
86
87
88       ──────────────────────────────────────────────────────
89       OS                   resolutions           bpp values
90       Windows 3            32x32                 1, 4
91
92       Windows 4            16x16, 32x32, 48x48   4, 8
93       NT 5                 16x16, 32x32, 48x48   4, 8, 32
94       <td rowspan=3>NT 6   16x16, 32x32, 48x48   4, 8, 32
95       24x24, 96x96         8, 32
96
97       256x256              32 (PNG encoded)
98
99
100       Within the icon file, the images with low bpp values are usually stored
101       first.  With the same bpp value, the images are sorted  by  resolution,
102       large images first.
103
104
105
106   MIME Type and File Name Extension
107       The  MIME  type  of  Windows  icon  files  is  registered  by  IANA  as
108       image/vnd.microsoft.icon, but the unofficial name image/x-icon is still
109       widely used.
110
111       The  file  name  extension (used by Microsoft operating systems as file
112       type identifier) is .ico.
113

DOCUMENT SOURCE

115       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
116       source.  The master documentation is at
117
118              http://netpbm.sourceforge.net/doc/winicon.html
119
120netpbm documentation             12 April 2013                Windows Icons(1)
Impressum