Converts image to new color space using a conversion matrix.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_colorspace_conversion_create_from_matrix( enumIGColorSpaceIDs sourceSpace, const AT_INT* sourceChannelDepths, AT_INT sourceChannelCount, enumIGColorSpaceIDs resultSpace, const AT_INT* resultChannelDepths, AT_INT resultChannelCount, HIGDoubleMatrix conversionMatrix, LPCAT_COLORSPACE_CONVERSION_OPTIONS options, HIGCSCONVERTER* hCSConverter ); |
Arguments:
sourceChannelDepths | Array of channel depths for source color space. See enumIGColorSpaceIDs. |
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. |
conversionMatrix | Conversion matrix. |
options | Reserved for future use. |
hCSConverter | Returns the handle of color space converter. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional.
Remarks:
Destination pixels are calculated as Dst = M * Src, where M is conversion matrix. Number of channels after conversion will be equal to first dimension of the conversionMatrix. Second dimension of conversionMatrix should be equal to number of channels in the source image.