ImageGear Professional > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Colorspace Functions > IG_image_colorspace_convert |
This function converts an image to the specified color space.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_image_colorspace_convert( HIGEAR hIGear, enumIGColorSpaceIDs newColorSpace, LPCAT_COLORSPACE_CONVERSION_OPTIONS options ); |
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle of image. |
newColorSpace | enumIGColorSpaceIDs | Color space to which to convert. |
options | LPCAT_COLORSPACE_CONVERSION_OPTIONS | Conversion options (or NULL). |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
All pixel formats supported by ImageGear Professional.
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); |
Specify the new color space using a value from enumIGColorSpaceIDs. Argument options control the conversion flow. You may pass NULL for options if you don't want to specify any options.