PdfImageLayout(Int32, Int32, PdfColorSpace, Int32) Constructor

Definition

Assembly Broadside.dll

The shape of a buffer of image samples: its size, colour space and bits per component.

public PdfImageLayout(int Width, int Height, PdfColorSpace ColorSpace, int BitsPerComponent = 8)

Parameters

Width
Int32

The width in samples (pixels), at least 1.

Height
Int32

The height in samples (rows), at least 1.

ColorSpace
PdfColorSpace

The colour space of the samples: a device space, or a space of the document the image is created in (any but Pattern; an Indexed space from CreateIndexedColorSpace(PdfColorSpace, ReadOnlySpan<Byte>) takes palette indices).

BitsPerComponent
Int32

The bits per sample: 1, 2, 4, 8 or 16 (16 is PDF 1.5).

Remarks

ISO 32000-2 §8.9.2 and §8.9.3: the samples are stored row by row from the top, each row starting on a byte boundary, the components of a pixel together, MSB first; a 16-bit sample takes two bytes, high byte first. A row is therefore ceil(Width × components × BitsPerComponent / 8) bytes.