DynaPDF Manual - Page 381

Previous Page 380   Index   Next Page 382

Function Reference
Page 381 of 839
The function returns the active color space.
GetColorSpaceCount
Syntax:
SI32 pdfGetColorSpaceCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of color space objects which are used in the current document.
Color spaces can be accessed with GetColorSpaceObj().
GetColorSpaceObj
Syntax:
LBOOL pdfGetColorSpaceObj(
const PPDF* IPDF)
// Instance pointer
UI32 Handle,
// Color space handle
struct TPDFColorSpaceObj* CS) // Structure to be filled
struct TPDFColorSpaceObj
{
TExtColorSpace Type;
TExtColorSpace Alternate;// Alternate or base space of Indexed or Pattern color spaces.
void* IAlternate;
// Optional alternate color space.
BYTE* Buffer;
// ICC profile or color table of an Indexed color space.
UI32 BufSize;
// Buffer length in bytes.
float* BlackPoint;
// CIE black point. If set, the array contains exactly 3 values.
float* WhitePoint;
// CIE white point. If set, the array contains exactly 3 values.
float* Gamma;
// If set, one value per component.
float* Range;
// min/max per component or .a .b components of a Lab color space.
float* Matrix;
// XYZ matrix. If set, the array contains exactly 9 values.
UI32 NumInComponents;
// Number of input components.
UI32 NumOutComponents; // Number of output components.
UI32 NumColors;
// HiVal + 1. Indexed color space only.
BYTE* Colorants[32];
// Colorant names (Separation, DeviceN, and NChannel only).
UI32 ColorantsCount;
// The number of colorants in the array.
BYTE* Metadata;
// Optional XMP metadata stream -> ICCBased only.
UI32 MetadataSize;
// Metadata length in bytes.
void* IFunction;
// Pointer to function object -> Special color spaces only
void* IAttributes;
// Optional attributes of DeviceN or NChannel color spaces
void* IColorSpaceObj;
// Pointer of the corresponding color space object
void* Reserved01;
void* Reserved02;
void* Reserved03;
void* Reserved04;
void* Reserved05;
void* Reserved06;
void* Reserved07;
void* Reserved08;
void* Reserved09;
};
The function retrieves the most important properties of a color space. The parameter handle must be
a valid handle of a color space. A color space handle is a simple array index. The number of color
spaces is returned by the function GetColorSpaceCount().Reserved fields of the structure
TPDFColorSpaceObj must be initialized with NULL.
 

Previous topic: GetColorSpace

Next topic: GetColorSpaceObjEx, GetCompressionFilter