| Herd Software Development
DaVinci Graphics Library
DaVinci Documentation Home Search Order


DIBs in the CMYK colourspace are stored by DaVinci in a format first introduced by Microsoft with ICM (Integrated Color Management) 1.0 and Windows 95/NT 4. This format was specified by Microsoft even though no support is available for it within the operating system.

Beginning with Windows 95/NT, DIBs can use a BITMAPV4HEADER structure instead of a BITMAPINFOHEADER structure. Accordingly, all other structures (color palettes, bits) are shifted behind this structure. The biSize field specifies whether a DIB is BITMAPINFOHEADER or BITMAPV4HEADER.

The bV4CSType field is the CMYK DIB (Color space Type) identifier, and takes the following values:

Symbolic constant Value Importance
LCS_CALIBRATED_RGB 0 The DIB is in the normalized sRGB colourspace of ICM
LCS_DEVICE_RGB 1 The DIB is of the screen in the RGB colourspace
LCS_DEVICE_CMYK 2 The DIB is of the printer in the CMYK colourspace

Since the DIB is stored at 8 bits per CMYK component, bV4BitCount is biBitCount = 32.

Example: They recognize whether a DIB is available in the CMYK colourspace.
/* DIBIsCmyk
 * Returns TRUE if the DIB pointed to by lpbmi is a CMYK DIB
   BOOL	Result = FALSE;

   if (lpbmi->biSize == sizeof(BITMAPV4HEADER))

      Result = lpbmi4->bV4CSType == LCS_DEVICE_CMYK;

   return Result;
} // DIBIsCmyk