Introduction
The OS/2 colour pointer is a colour mouse pointer stored as a BMP file with the type
code CP. It is laid out exactly like a
colour OS/2 icon: a 1-bit bitmap of AND and XOR
masks that decides where the pointer is transparent, then a colour image for the rest.
The file header carries the hotspot, the pixel that marks where the pointer points.
Pointer files are usually named .ptr. A file with versions for several
screens is a bitmap array whose entries are
CP images.
Structure
The parts are those of a colour icon: two sets of
headers, each starting with CP, then the mask bits and the colour image.
The hotspot is in the first file header, in the fields described on the
pointer page. All numbers are little-endian.
0File headerCP, size, hotspot and the offset of the masks14 bytes14DIB header and two-entry colour table for the masksvaries…Second file headerCPagain, with the offset of the colour image14 bytes…DIB header and colour table for the colour imagevaries…Masks then the colour image, each at the offset in its file headervaries
Telling it apart
The file starts with CP (43 50). After the first DIB header
and its two-entry colour table comes a second file header, also starting with
CP. Apart from the type code it is identical to a
colour icon. A black and white
pointer starts with PT and has only
one file header.
Variants
- Windows bitmap (BM) – Windows bitmaps: a header, an optional palette and rows of pixels
- OS/2 bitmap array (BA) – several OS/2 bitmaps, icons or pointers for different screens, chained in one file
- OS/2 icon (IC) – a black and white OS/2 icon: AND and XOR masks in one 1-bit bitmap
- OS/2 colour icon (CI) – a colour OS/2 icon: a 1-bit mask bitmap followed by a colour image
- OS/2 pointer (PT) – a black and white OS/2 mouse pointer, with its hotspot in the header
- OS/2 colour pointer (CP) – a colour OS/2 mouse pointer: masks, a colour image and a hotspot