An image interned in a display list: its samples, with the colour space and Decode mapping that give them meaning, shared by every paint of the same image XObject in the list. Never converted: a backend converts the samples to its device model.
public sealed class DisplayImage
ISO 32000-2 §8.9.5 (image dictionaries: Width, Height, ColorSpace, BitsPerComponent, Decode, Interpolate), §8.9.7 (inline
images, decoded once per paint) and §8.9.3 (the sample layout: rows top to bottom, samples left to right, components interleaved,
each row starting on a byte boundary, 16-bit samples big-endian). The image is painted into the unit square of user space
(§8.9.4): image space maps to it through [1/Width 0 0 −1/Height 0 1], so the first row lands at the top, then through
the transform set before the paint.
Fonts, images and colours are resolved before an operation enters the list, so a backend never reads the file. One instance per distinct image XObject per list: a backend may key a per-surface cache (a converted bitmap, a native image) on the instance. Immutable; safe to read from any number of threads.
Convert with list.Document.GetColorConverter(image.ColorSpace, conversion with { Target = … }, defaultColorSpaces), the
raw samples first mapped through DecodeMap (for an Indexed image, MapToIndices(ReadOnlySpan<UInt16>, Span<Byte>, Int32)).
Most images are decoded when the list is built. An image whose codec decodes reduced resolutions (MaxReduction
above 0; ImageHeader.MaxReduction) is instead kept encoded, its header read and its limits checked, and is decoded when it
is drawn: GetSamplesAt(Int32) decodes it at the reduction asked for, once per reduction however many tiles ask at the same
time, and the document's image cache keeps the result within its budget. A decode that fails then records its diagnostics on
the document when the image is first drawn, not when the list is built, and the image paints nothing. A finer reduction already
decoded serves a coarser request. The encoded data lives in the list, so a backend still never reads the file.
kind:method, kind:property, kind:ctor. Press Esc to clear.BitsPerComponentGets the logical bits per component n: raw values run from 0 to 2^n − 1.ColorKeyGets the colour key ranges: a minimum and maximum raw sample value per component; a sample whose every component is in its range is not painted. Empty when the image has none.ColorSpaceGets the colour space of the samples, as resolved before default colour spaces apply.ColorTableGets the colour table of an Indexed image as stored (m bytes per colour, m the base space's component count), read when the list is built so that a backend never reads the file for it; empty for any other image.ComponentsGets the number of colour components per sample: the colour space's (1 for an Indexed image).DecodeMapGets the mapping from raw sample values to colour components, the codec's polarity folded in.HeightGets the height in samples.InterpolateGets a value indicating whether the image asks to be interpolated (smoothed) when it is enlarged.MaskGets the image's explicit mask: where it paints, the image shows; elsewhere it leaves the backdrop; null when the image has none.MatteGets the colour the samples were pre-blended with, one value per component of ColorSpace (of its base for an Indexed space), to be removed with the SoftMask's opacity before conversion; empty when there is none.MaxReductionGets the largest reduction, as a power of two, that GetSamplesAt(Int32) can deliver: 0 for an image decoded when the list was built, up to 3 (an eighth) or more for one whose codec decodes reduced resolutions.SamplesGets the raw samples at the image's own resolution, Stride × Height bytes in the §8.9.3 layout.SoftMaskGets the image's soft mask: a one-component image (DeviceGray, its own Decode mapping) whose values, 0 to 1, are the opacity of the image at each point; null when the image has none.StorageBitsGets the bits each component occupies in Samples: 1, 2, 4, 8 or 16.WidthGets the width in samples.DecodeMapFor(DisplayImageSamples)Returns the mapping from the raw values of samples (from GetSamplesAt(Int32)) to colour components: DecodeMap, at 8 bits when a reduction turned samples of fewer bits (a 1-bit scan, a 4-bit image) into 8-bit averages.GetReduction(in Matrix, Double, PdfColorConverter?)Returns the reduction to ask GetSamplesAt(Int32) for when the image is drawn under transform: the largest power of two that still leaves at least samplesPerPixel samples per device pixel along the image's most enlarged direction, within what the codec delivers and what the colour conversion allows.GetRow(Int32)Gets one row of Samples.GetSamplesAt(Int32, CancellationToken)As GetSamplesAt(Int32), stopping a decode in progress when cancellationToken is cancelled.GetSamplesAt(Int32)Returns the image's samples at a reduction of 2^reduction, or at the finest one that is cheaper to get: a finer reduction already decoded, or the largest the codec delivers (MaxReduction).