File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
Images
  • Raster
  • Vector
  • Camera raw
  • Layered projects
  • HDR & scientific
  • Icons
  • Retro
  1. Home
  2. Images
  3. Raster
  4. BMP
  5. IC
.BMP
  • Overview
  • Windows bitmap (BM)
    • File header
    • DIB header
    • Colour spaces
    • Colour table
    • Bit masks
    • Pixel data
    • Compression
  • OS/2 bitmap array (BA)
  • OS/2 icon (IC)
  • OS/2 colour icon (CI)
  • OS/2 pointer (PT)
  • OS/2 colour pointer (CP)

.ICO

OS/2 icon (IC)

Introduction

The OS/2 icon is a black and white icon stored as a BMP file with the type code IC. It holds one 1-bit bitmap twice the icon’s height, made of two masks one above the other. Together the masks make each pixel black, white, transparent or the inverse of whatever is behind it.

OS/2 icons are usually named .ico, but they are not the same format as a Windows icon. An icon file often holds several sizes for different screens, in which case it is a bitmap array whose entries are IC or colour icon images.

Software

  • ArcaOS, the current OS/2, whose Icon Editor opens and saves them
  • Deark, which converts them to PNG (Windows, macOS, Linux)

Structure

The file has the same parts as a BM bitmap. The DIB header describes a 1-bit image whose height is twice the icon’s height, and the colour table has two entries. All numbers are little-endian.

  1. 0File header IC, size, hotspot and the offset of the pixels14 bytes
  2. 14DIB header width, double height, 1 bit per pixel12 to 64 bytes
  3. …Colour table two entries, black and white6 or 8 bytes
  4. …Masks 1-bit rows padded to 4 bytes, the AND mask and the XOR mask one above the othervaries
An OS/2 icon

File header

OS/2 gives the two reserved fields of the bitmap file header a use:

OffsetSizeTypeNameDescription
02char[2]usTypeThe signature IC (49 43).
24u32cbSizeA size field; readers should not depend on it.
62i16xHotspotThe hotspot’s x position. It matters for pointers; icons usually leave it 0.
82i16yHotspotThe hotspot’s y position.
104u32offBitsThe offset from the start of the file to the mask bits.

How the masks combine

Each pixel of the icon has one bit in the AND mask and one in the XOR mask. When the icon is drawn, the screen is ANDed with the first and then XORed with the second:

ANDXORResult
00Black
01White
10Transparent: the screen shows through
11The screen, inverted

Telling it apart

The file starts with IC (49 43), and its DIB header gives 1 bit per pixel with a height twice the width. An OS/2 pointer is laid out the same way and differs only in its type code, PT. A colour icon starts with CI instead and has a second file header. A Windows .ico file starts with 00 00 01 00.

Also used for

  • Windows icon .ico
© 2026 fileformats.org About Contact Made by Lewpen