FrameRefinement Class

Describes a rendering of a frame that ImageReader<TPixel>.ReadFrameRefinementInto wrote to an image: an intermediate rendering, computed from the part of the frame that was received, or the frame itself.

public sealed class FrameRefinement

Remarks

A format that stores an image at increasing levels of detail (a progressive JPEG XL or JPEG file, an interlaced PNG file) gives intermediate renderings before the frame; any other input gives the frame at once, with FrameRefinement.IsFinal set. An input that ends before the frame may give a last intermediate rendering of what was decoded before the read that reports the truncation. The number of intermediate renderings of a file and their pixels are not part of the contract of the library: only the final rendering is the frame that ImageReader<TPixel>.ReadFrameInto returns.

Properties

NameDescription
CompletedPassesGets the number of passes of the frame that the rendering holds: 0 for a rendering that has none of them yet.
DownsamplingGets the factor by which the detail of the rendering is reduced in each direction, as the file declares it: 8 for a rendering that only has one value per block of 8x8 pixels, then 4, 2, and 1 for the frame itself. The rendering always has the size of the frame.
IsFinalGets a value indicating whether the rendering is the frame itself: the image then holds what ImageReader<TPixel>.ReadFrameInto gives, and the next read starts the next frame.

CompletedPasses

FrameRefinement.cs

Gets the number of passes of the frame that the rendering holds: 0 for a rendering that has none of them yet.

public int CompletedPasses { get; }

Property value

int

Downsampling

FrameRefinement.cs

Gets the factor by which the detail of the rendering is reduced in each direction, as the file declares it: 8 for a rendering that only has one value per block of 8x8 pixels, then 4, 2, and 1 for the frame itself. The rendering always has the size of the frame.

public int Downsampling { get; }

Property value

int

Gets a value indicating whether the rendering is the frame itself: the image then holds what ImageReader<TPixel>.ReadFrameInto gives, and the next read starts the next frame.

public bool IsFinal { get; }

Property value

bool