ImageGear for C and C++ on Windows v20.0 - Updated
IG_IP_pixel_format_convert_to_image_format
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_pixel_format_convert_to_image_format

This function converts a single pixel to color space and channel depths of the specified HIGEAR image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_pixel_format_convert_to_image_format(
        HIGPIXEL hPixel,
        enumIGColorSpaceIDs SrcColorSpace,
        const AT_INT* SrcChannelDepths,
        AT_RGBQUAD* SrcPalette,
        HIGEAR hIGear
);

Arguments:

Name Type Description
hPixel HIGPIXEL Pixel to convert to the new format.
SrcColorSpace enumIGColorSpaceIDs Source color space of the pixel.
SrcChannelDepths const AT_INT* Source channel depths of the pixel. Length of the array should be equal to number of channels used by the hPixel.
SrcPalette AT_RGBQUAD* Source palette used by the pixel, if its color space is Indexed, or null otherwise.
hIGear HIGEAR Image whose color space, channel depths, and palette will be used for destination format when converting the pixel.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Remarks:

Please note that using this function in a cycle for large array of pixels could be inefficient. Consider creating a temporary HIGEAR and converting its color space and channel depths in this case.

Is this page helpful?
Yes No
Thanks for your feedback.