ImageGear for C and C++ on Windows v21.0 - Updated
API Reference Guide / PDF Component API Reference / PDF Component Objects Reference / Page Editing Objects and Elements / HIG_PDE_COLORSPACE / IG_PDE_colorspace_get_color_components
In This Topic
    IG_PDE_colorspace_get_color_components
    In This Topic

    Calculates the number of components in a color space.

    Declaration:

     
    Copy Code
    AT_ERRCOUNT ACCUAPI IG_PDE_colorspace_get_color_components (
            HIG_PDE_COLORSPACE hColorSpace,
            LPLONG lnpColorComponents
    );
    

    Arguments:

    Name Type Description
    hColorSpace HIG_PDE_COLORSPACE A color space object.
    lpnColorComponents LPLONG

    Number of components in hColorSpace. 

    • DeviceGray, CalGray, Separation: Returns 1.
    • DeviceRGB, CalRGB: Returns 3.
    • DeviceCMYK, Lab: Returns 4.
    • DeviceN, ICCBased: Returns the number of components dependent on the specific color space object.
    • Indexed: Returns 1.

    Use IG_PDE_colorspace_get_base_color_components to get the number of components in the base color space.

    Return Value:

    Error count.

    Supported Raster Image Formats:

    This function does not process image pixels.