PDFsharp-net6

Palette

Namespace: PdfSharp.BigGustave

The Palette class.

public class Palette

Inheritance ObjectPalette

Properties

HasAlphaValues

True if palette has alpha values.

public bool HasAlphaValues { get; private set; }

Property Value

Boolean

Data

The palette data.

public Byte[] Data { get; }

Property Value

Byte[]

Constructors

Palette(Byte[])

Creates a palette object. Input palette data length from PLTE chunk must be a multiple of 3.

public Palette(Byte[] data)

Parameters

data Byte[]

Methods

SetAlphaValues(Byte[])

Adds transparency values from tRNS chunk.

public void SetAlphaValues(Byte[] bytes)

Parameters

bytes Byte[]

GetPixel(Int32)

Gets the palette entry for a specific index.

public Pixel GetPixel(int index)

Parameters

index Int32

Returns

Pixel