Files with ICO extension are image file types used as icon for representation of an application on Microsoft Windows. These come in different size, colour support and resolution to suit the requirements of the display. Another similar image file format on Microsoft Windows is CUR for cursor representation and defines a hotspot in the image header. On MacOS, ICNS file formats serve the same purpose as ICO files. Several online websites as well as applications provide the feature of creating such files and convert other image formats such as BMP, PNG, etc. to icon file format. The official IANA registered Internet media type for ICO files is image/vnd.microsoft.icon.
Icons were introduced with the launch of Microsoft Windows 1.0. These were 32x32 in size and were monochrome. With the arrival fo win32, support for icon images in true colour was introduced with up to 256x256 pixels in dimension. Windows XP was the first to provide support for 32-bit colour icon images, allowing semi-transparent areas like shadows, anti-aliasing and glass-like effects to be added to the icon. Microsoft only recommended icon sizes up to 48×48 pixels for Windows XP. Windows Vista added a 256×256-pixel icon view to Windows Explorer, as well as support for the compressed PNG format. With users using higher resolutions and high DPI modes, larger icon formats (such as 256×256) are recommended.
ICO File Format
A single ICO file consists of one or more than one small images of multiple sizes and colour depths. The presence of images of multiple sizes is for appropriate scaling at different screen resolutions. All values in ICO/CUR files are represented in little-endian byte order.
The ICO file consists of an Icon header, an Icon Directory,
Stores general information about the ICO file.
Stores general information about every image in the file.
The actual “data” for the first image in old AND/XOR DIB format or newer PNG
Data for the last icon image
Size (in bytes)
Reserved. Must always be 0.
Specifies image type: 1 for icon (.ICO) image, 2 for cursor (.CUR) image. Other values are invalid.
Specifies number of images in the file.
The directory contained in an ICO file, represented as ICONDIR structure, contains an ICONDIRECTORY structure for each image in the file. The same is followed by a contiguous block of all image bitmap data. This is as shown below.
Width, should be 0 if 256 pixels
Height, should be 0 if 256 pixels
Color count, should be 0 if more than 256 colors
Reserved, should be 0
Color planes when in .ICO format, should be 0 or 1, or the X hotspot when in .CUR format
Bits per pixel when in .ICO format, or the Y hotspot when in .CUR format