CreateIndexedColorSpace(PdfColorSpace, ReadOnlySpan) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Creates an Indexed colour space over baseSpace, or returns the one this document already has for the same table.

public PdfIndexedColorSpace CreateIndexedColorSpace(PdfColorSpace baseSpace, ReadOnlySpan<byte> lookup)

Parameters

baseSpace
PdfColorSpace

The space of the table's colours: a device, CIE-based, ICCBased, Separation or DeviceN space of this document; not Pattern or Indexed.

lookup
ReadOnlySpan<Byte>

The colour table: one entry per index from 0, each the base space's components as bytes (0 the minimum of a component's range, 255 the maximum); 1 to 256 entries.

Returns

PdfIndexedColorSpace
The space: [/Indexed base hival lookup], an indirect array whose lookup is a stream.

Remarks

ISO 32000-2 §8.6.6.3 (PDF 1.1; the lookup is a stream, which every version allows). Records PDF 1.1 and the base space's version. A mutation.