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. CP
.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)

.PTR

OS/2 colour pointer (CP)

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.

Software

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

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.

  1. 0File header CP, size, hotspot and the offset of the masks14 bytes
  2. 14DIB header and two-entry colour table for the masksvaries
  3. …Second file header CP again, with the offset of the colour image14 bytes
  4. …DIB header and colour table for the colour imagevaries
  5. …Masks then the colour image, each at the offset in its file headervaries
An OS/2 colour pointer

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.

© 2026 fileformats.org About Contact Made by Lewpen