Export (0) Print
Expand All

Using GDI Functions With WCS

There are various functions in the graphics device interface (GDI) that use or operate on color data. Some are enabled for use with WCS and some are not. The following GDI functions are relevant to ICM:

Device Context Functions with WCS

CreateCompatibleDCIf the device context (DC) that is passed to this function through its hdc parameter is enabled for ICM, then the DC the function creates is also ICM-enabled. The source and destination color spaces are specified in the DC.
CreateDCICM can be enabled by setting the dmICMMethod member of the DEVMODE structure pointed to by the pInitData parameter to the appropriate value. For details, see the documentation in the Platform SDK on the DEVMODE structure.
ResetDCThe color profile of the device context specified by the hdc parameter will be reset based on the information in the DEVMODE structure specified by the lpInitData parameter.

 

Pen And Brush Functions with WCS

Brush FunctionsNo color management is done at brush creation. However, color management will be performed when the brush is selected into an ICM-enabled DC.
CreatePenNo color management is done at pen creation. However, color management will be performed when the brush is selected into an ICM-enabled DC.
ExtCreatePenNo color management is done at pen creation. However, color management will be performed when the brush is selected into an ICM-enabled DC.
SelectObjectIf the object being selected is a brush or a pen, color management is performed.
SetDCBrushColorColor management is performed if WCS is enabled.
SetDCPenColorColor management is performed if WCS is enabled.

 

Text Output Functions with WCS

SetBkColorColor management is performed if WCS is enabled.
SetTextColorColor management is performed if WCS is enabled.

 

Bitmap Functions with WCS

BitBltNo color management is performed when blits occur.
CreateDIBitmapThe fuUsage parameter specifies that the bmiColors member of the BITMAPINFO structure pointed at by the lpbmi parameter does or does not contain color information. If it does not, no color management is performed for this bitmap. The bitmap must use version 4 or version 5 of the BITMAPINFO structure for color management to be enabled. The contents of the resulting bitmap are not color matched after the bitmap has been created.
CreateDIBSectionIf the BITMAPINFO structure passed through the pbmi parameter is not version 4 or version 5, no color management is done. If it is version 4 or 5, color management is enabled, and the specified color space is associated with the bitmap.
MaskBltNo color management is performed when blits occur.
SelectObjectIf the object is a bitmap created with CreateDIBSection, color management is performed. The bitmap's color space is used as the destination color space.
SetDIBitsColor management is performed. If the specified BITMAPINFO structure is not version 4 or version 5, the color profile of the current DC is used as the source color space profile. If it does not have one, the sRGB space is used. If the specified BITMAPINFO structure is version 4 or version 5, the color space profile specified in the bitmap header is used as the source color space profile.
SetDIBitsToDeviceColor management is performed. If the specified BITMAPINFO structure is not version 4 or version 5, the color profile of the current device context is used as the source color space profile. If it doesn't have one, the sRGB color space is used. If the specified BITMAPINFO structure is version 4 or version 5, the color space profile associated with the bitmap is used as the source color space.
SetDIBColorTableNo color management is performed.
StretchBltNo color management is performed when blits occur.
StretchDIBitsColor management is performed. If the specified BITMAPINFO structure is not version 4 or version 5, the color profile of the current DC is used as the source color space profile. If it does not have one, the sRGB space is used. If the specified BITMAPINFO structure is version 4 or version 5, the color space profile specified in the bitmap header is used as the source color space profile.

 

 

 

Community Additions

ADD
Show:
© 2015 Microsoft