MIL_ID SystemId, | //in |
MIL_INT64 ContextType, | //in |
MIL_INT64 SourceColorSpace, | //in |
MIL_ID ColorSpaceProfileId, | //in |
MIL_INT64 ControlFlag, | //in |
MIL_ID *ContextIdPtr | //out |
This function allocates a color matching context or a relative color calibration context on the specified system. When you no longer require the context, release its memory using McolFree().
The context contains all the information necessary to perform McolMatch() (for color matching) or McolTransform() (for relative color calibration), including global context settings and color-samples. To add color-samples to a context, use McolDefine(). To adjust context and color-sample settings, use McolControl() and McolSetMethod().
MIL considers all color data to be the same as the context's color space, regardless of the color attributes of the data's buffer (MbufAllocColor()). For relative color calibration, color must be RGB (8-bit).
Specifies the system on which to allocate the context. This parameter should be set to one of the following values:
For specifying the system
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT_HOST |
Specifies the default Host system of the current MIL application. |
||||||||||||||||||||||||||||||||||||||
MIL system identifier |
Specifies a valid system identifier, previously allocated using MsysAlloc(). |
Specifies the type of context. This parameter must be set to one of the following values:
For specifying the context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_COLOR_CALIBRATION_RELATIVE |
Specifies a context for transforming color data using relative color calibration (McolTransform()). |
||||||||||||||||||||||||||||||||||||||
M_COLOR_MATCHING |
Specifies a context for color matching (McolMatch()). |
Specifies the source color space of the context. In general, all color data required for the color operation should be the same as the source color space. For example, if you specify an M_RGB source color space, color-samples (McolDefine()) and target or source images (McolMatch() or McolTransform()) should also typically be RGB.
This parameter should be set to one of the following values. Unless otherwise specified, values apply to both color matching and relative color calibration contexts.
For specifying the color
space
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_RGB. |
||||||||||||||||||||||||||||||||||||||
M_CIELAB |
Specifies a CIELAB (or LAB) color space. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_HSL |
Specifies an HSL color space. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_RGB |
Specifies an RGB color space. (more details...) |
Specifies the context's color space profile. This is the standard MIL uses to interpret the source color space data when performing an internal conversion between two distinct color spaces before the match operation (for example, specifying a CIELAB conversion mode with McolSetMethod() prior to calling McolMatch()). Unless you are performing such a conversion for the match, the color space profile standard has no effect.
This parameter must be set to the following value:
For specifying the context's color space
profile
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies to use standard RGB specifications (sRGB), as defined by the International Electrotechnical Commission (IEC) Project Team 61966-2-1. |
Header | Include mil.h. |
Library | Use mil.lib; milcolor.lib. |
DLL | Requires mil.dll; milcolor.dll. |