THE DEVICE-INDEPENDENT BITMAP (DIB)

The device-independent bitmap (DIB) format is an extension of the bitmap format introduced in the OS/2 1.1 Presentation Manager. It solves some of the device dependencies of the old bitmap format by including a color table that defines an RGB value for each color in the bitmap.

The device-independent bitmap has several other differences from the old bitmap format: First, color is always represented by multiple color bits per pixel and never as multiple color planes, despite how buffer memory is organized on the output device. The number of color bits per pixel may be 1 (for monochrome bitmaps), 4 (16-color bitmaps), 8 (256 colors), or 24 (16 million colors). Second, the array of bits begins with the bottom row of pixels rather than the top. Third, additional information is included in the bitmap to indicate a resolution of the image. (This may help programs in scaling a bitmap to a proper size.) Fourth, the bitmap data may be compressed using a run-length-encoded (RLE) algorithm.