GetColorSpace(CosObject) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Returns the colour space a colour space value describes.

public PdfColorSpace GetColorSpace(CosObject colorSpace)

Parameters

colorSpace
CosObject

A family name (/DeviceRGB, /Pattern), a colour space array ([/ICCBased 5 0 R]), or a reference to one, such as an image's ColorSpace entry or a value of a resource dictionary's ColorSpace subdictionary.

Returns

PdfColorSpace
The space, shared by every caller asking for the same object. A value that is not a colour space, or one that cannot be used (an unknown family, a space that refers to itself), reads as DeviceGray with a diagnostic.

Remarks

ISO 32000-2 §8.6.3, Table 61. A name other than a family name (a resource name such as /CS0) is not looked up here; content streams resolve those through GetColorSpace(CosObject). Deviations are recorded on Diagnostics once, when the space is first read.