ImageGear Professional DLL v17.1 for Windows Accusoft
IG_image_colorspace_convert
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Colorspace Functions > IG_image_colorspace_convert

Glossary Item Box

This function converts an image to the specified color space.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_image_colorspace_convert(
        HIGEAR hIGear,
        enumIGColorSpaceIDs newColorSpace,
        LPCAT_COLORSPACE_CONVERSION_OPTIONS options
);

Arguments:

hIGear HIGEAR handle of image.
newColorSpace Color space to which to convert. See enumIGColorSpaceIDs.
options Conversion options (or NULL).

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
AT_ERRCOUNT nErrcount;  /* Number of errors on stack */
HIGEAR hImage;          /* HIGEAR handle of image */
IG_image_colorspace_convert(hImage, IG_COLOR_SPACE_ID_RGB, NULL);

Remarks:

Specify the new color space using a value from enumIGColorSpaceIDs. Argument 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.

©2012. Accusoft Corporation. All Rights Reserved.