ImageGear for C and C++ on Windows v19.10 - Updated
IG_PDE_colorspace_create
API Reference Guide > PDF Component API Reference > PDF Component Objects Reference > Page Editing Objects and Elements > HIG_PDE_COLORSPACE > IG_PDE_colorspace_create

Creates a new color space object of the specified type.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_PDE_colorspace_create(
        HIG_PDF_ATOM hFamily,
        LPAT_PDE_COLORDATA lpColorData,
        LPHIG_PDE_COLORSPACE lphColorSpace 
);

Arguments:

Name Type Description
hFamily HIG_PDF_ATOM

Supports the following PDF color spaces:

  • Device-dependent names: DeviceCMYK, DeviceGray, DeviceN, or DeviceRGB.
  • Device-independent names: CalGray, CalRGB, Lab, or ICCBased.
  • Special names: Indexed, Pattern, or Separation.
lpColorData LPAT_PDE_COLORDATA Color data for the type of color space you want to create.
lphColorSpace LPHIG_PDE_COLORSPACE Handle to the new color space.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

In some cases, creating a complex Colorspace object (for example, Indexed colorspace based on RGB) from scratch can lead to creating internal temp objects, which are never released. To avoid this, it is recommended that you call IG_PDF_cleanup_temp_objects() after all necessary colorspaces are created.