Table of Contents

Class PdfDecodedImage

Namespace
PdfEngine.Vector
Assembly
PdfEngine.Abstractions.dll

Decoded image pixels plus an optional separate alpha plane (SMask / Mask).

public sealed record PdfDecodedImage : IEquatable<PdfDecodedImage>
Inheritance
PdfDecodedImage
Implements
Inherited Members

Constructors

PdfDecodedImage(int, int, PdfDecodedImageFormat, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>?, bool, Func<byte[], int, int, int, byte[]>?)

Decoded image pixels plus an optional separate alpha plane (SMask / Mask).

public PdfDecodedImage(int Width, int Height, PdfDecodedImageFormat Format, ReadOnlyMemory<byte> Data, ReadOnlyMemory<byte>? Alpha = null, bool InvertCmykJpeg = false, Func<byte[], int, int, int, byte[]>? MapJpegComponents = null)

Parameters

Width int
Height int
Format PdfDecodedImageFormat
Data ReadOnlyMemory<byte>
Alpha ReadOnlyMemory<byte>?

Width×Height 8-bit alpha applied on top of Data; null when opaque or already in Bgra32.

InvertCmykJpeg bool

JPEG is Adobe-style inverted CMYK that the backend must un-invert.

MapJpegComponents Func<byte[], int, int, int, byte[]>

Properties

Alpha

Width×Height 8-bit alpha applied on top of Data; null when opaque or already in Bgra32.

public ReadOnlyMemory<byte>? Alpha { get; init; }

Property Value

ReadOnlyMemory<byte>?

ByteSize

public long ByteSize { get; }

Property Value

long

Data

public ReadOnlyMemory<byte> Data { get; init; }

Property Value

ReadOnlyMemory<byte>

Format

public PdfDecodedImageFormat Format { get; init; }

Property Value

PdfDecodedImageFormat

Height

public int Height { get; init; }

Property Value

int

InvertCmykJpeg

JPEG is Adobe-style inverted CMYK that the backend must un-invert.

public bool InvertCmykJpeg { get; init; }

Property Value

bool

JpegIsSelfContained

For a JPEG: its own colours are a fair rendition even when MapJpegComponents is set (a device or ICC colour space whose mapping only adds colour management), so a consumer without a JPEG codec, such as a document exporter, may embed the data as it is.

public bool JpegIsSelfContained { get; init; }

Property Value

bool

JpegMask

A soft mask the core cannot decode (a JPEG): the backend decodes it and applies it as alpha.

public PdfJpegMask? JpegMask { get; init; }

Property Value

PdfJpegMask

MapJpegComponents

public Func<byte[], int, int, int, byte[]>? MapJpegComponents { get; init; }

Property Value

Func<byte[], int, int, int, byte[]>

Width

public int Width { get; init; }

Property Value

int