This function builds the channels structure for the specified conversion.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_colorspace_conversion_result_channels_build(
enumIGColorSpaceIDs sourceSpace,
const AT_INT* sourceChannelDepths,
AT_INT sourceChannelCount,
enumIGColorSpaceIDs resultSpace,
AT_INT* resultChannelDepths,
AT_INT* resultChannelCount,
LPCAT_COLORSPACE_CONVERSION_OPTIONS options
);
|
Arguments:
sourceSpace | Color space from which to convert. See enumIGColorSpaceIDs. |
sourceChannelDepths | Array of channel depths for source color space. |
sourceChannelCount | Number of channels in source color space. |
resultSpace | Color space to which to convert. See enumIGColorSpaceIDs. |
resultChannelDepths | Array of channel depths in resulting color space. |
resultChannelCount | Number of channels in resulting color space. |
options | Conversion options. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Sample:
None
Example:
Copy Code | |
---|---|
/* Calculate output channel depths for RGB to CMYK */ AT_ERRCOUNT nErrcount; /* Number of errors on stack */ AT_INT depthsIn[] = { 8, 8, 8 }; /* Channel depths */ AT_INT depthsOut[4]; /* Output channel depths */ AT_INT nDepthsOut = 4; /* Number of output channel depths */ nErrcount = IG_colorspace_conversion_result_channels_build( IG_COLOR_SPACE_ID_RGB, depthsIn, 3, IG_COLOR_SPACE_ID_CMYK, depthsOut, &nDepthsOut, NULL); /* depthsOut[] is { 8, 8, 8, 8 } */ |
Remarks:
This function fills resultChannelDepths with the calculated depths. resultChannelCount contains the quantity of channels in the result raster. Options controls the conversion flow. You may pass NULL for Options if you don't want to specify any options.
For the detailed information about AT_COLORSPACE_CONVERSION_OPTIONS structure and the whole color conversion process please refer to the section Working with Color Space Conversion Engine.