WINICON(1)

πŸ“¦
version 11.13.03 Β· 2 versions
  • 11.13.03 Β· centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 10.86.51 Β· arch rolling
, in centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 Windows Icons(1) 🌸

okay bestie, welcome to the Windows Icons(1) page from the General Commands Manual πŸ’– yes we are literally reading a manpage about icon files together, this is our hangout now, no cap.


✨ NAME ✨

Microsoft Windows icon files πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so a Microsoft Windows icon file is basically a little squad of images all living in one file 🫢 The images go at resolutions up to 256 by 256 pixels, with all kinds of different bpp values. And they're encoded one of two ways:

  • as a Portable Network Graphics file (PNG) β€” iconic ofc 🌈
  • or in a format that's similar to Microsoft's BMP format.

If it's encoded as BMP, the image includes an "AND mask", which is holding 1-bit transparency data. It may also carry additional 8-bit transparency data along with the color information. multi-tasking queen behavior πŸ’…

🎨 Color Depth 🎨

Okay so listen: except for the 16 bits per pixel images and images with bit fields β€” both of which are rare, so don't stress β€” the colors in all BMP encoded images are RGB with 8 bits per channel. And images with bpp values lower than 16 use a palette. πŸ–ŒοΈ

I.e. the bpp value gives you the number of distinct colors, not the color depth. the way that's such a common mix-up 😭

🧚 XOR Mask and AND Mask 🧚

BMP encoded images contain two pixel maps:

  • the so-called "XOR mask" β€” stores the color information for each pixel 🌈
  • the "AND mask" β€” stores the transparency belonging to it πŸ‘»

The names and the function of these maps are most easily understood by looking at how a 1-bpp icon image is rendered on a monochrome screen:

  • the pixels on the screen are logically AND-ed with the bits on the AND mask,
  • then the result is logically XOR-ed with the bits on the XOR mask.

So the result shakes out like this:

  • If a bit on the AND mask is reset, the corresponding bit on the XOR mask determines the color of the pixel on the screen.
  • If a bit in the AND mask is set and the corresponding bit in the XOR mask is black (reset), the image is transparent ✨
  • And finally, if the bits are set in both the AND and XOR mask (the pixel on the XOR mask is white), the background of the screen is inverted. πŸ’€

In color environments, a pixel on the XOR mask outside the opaque area of the image is usually black and sometimes white, but a color other than black and white will hardly give predictable results. so like. don't do that bestie πŸ™ˆ

Since Windows XP, there may also be an 8-bit transparency channel in 32-bpp BMP encoded icon images. The AND mask, however, is still required and used e.g. for generating shadows. πŸ‘‘

PNG encoded images don't contain AND masks. While rendering a PNG encoded image, Windows constructs an AND mask on the fly from the transparency channel, if present. she's resourceful like that πŸ’…

πŸ¦‹ Evolution of Windows Icons πŸ¦‹

The Windows icon file format has undergone some extensions since it was invented in the mid-eighties for Windows 1:

  • Windows 1 used monochrome 32x32 icons only.
  • Windows 3.0 added color icons with bpp values up to 8.
  • Windows 4.0 (a.k.a. Windows95) added option for 32-bpp images and resolutions up to 256 by 256.
  • NT 5.1 (a.k.a. Windows XP) added option for the 8-bit transparency channel in the unused bits of 32-bpp images.
  • NT 6.0 (a.k.a. Windows Vista) added option for PNG encoded images.

glow-up after glow-up, we love a format with a journey 🌸

πŸ“ Common Resolutions and BPP Values πŸ“

Typical resolutions and bpp values of the Windows shell icons include:

  • Windows 3 β€” resolutions: 32x32; bpp values: 1, 4
  • Windows 4 β€” resolutions: 16x16, 32x32, 48x48; bpp values: 4, 8
  • NT 5 β€” resolutions: 16x16, 32x32, 48x48; bpp values: 4, 8, 32
  • NT 6 β€” resolutions: 16x16, 32x32, 48x48; bpp values: 4, 8, 32
  • NT 6 β€” resolutions: 24x24, 96x96; bpp values: 8, 32
  • NT 6 β€” resolutions: 256x256; bpp values: 32 (PNG encoded)

Within the icon file, the images with low bpp values are usually stored first. And with the same bpp value, the images are sorted by resolution, large images first. organized queen πŸŽ€

🌈 MIME Type and File Name Extension 🌈

The MIME type of Windows icon files is registered by IANA as image/vnd.microsoft.icon, but the unofficial name image/x-icon is still widely used. classic unofficial-name-still-popping-off situation 😭

The file name extension (used by Microsoft operating systems as file type identifier) is .ico. πŸ’–


πŸ“œ DOCUMENT SOURCE πŸ“œ

This manual page was generated by the Netpbm tool makeman from HTML source. The master documentation is at:

http://netpbm.sourceforge.net/doc/winicon.html

and that's the whole thing bestie 🫢 this was netpbm documentation, dated 12 April 2013, and it's literally the Windows Icons(1) page πŸ’œ slay, bye, go make some .ico files βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from