PeachImage
PeachImage.DecoderOptions
DecoderOptions.PreviewAvailable Property
Called, while the full image is still being decoded, with a lower-fidelity version of it: a JPEG XL preview frame, one per pass of an interlaced PNG, or one per scan of a progressive JPEG. Formats with no such intermediate (see HasPreview) never call it.
public System.Action<PeachImage.Image>? PreviewAvailable { get; init; }
Property Value
Remarks
The callback runs synchronously on the decoding thread, zero or more times, before Load returns; the
final image is the return value of Load, not a callback. Each Image passed in is a new
copy that the callback owns and must dispose. A preview has the same pixel format as the final image and
may be smaller than it (a JPEG XL preview) or full size with unrefined detail (PNG and JPEG). An exception
thrown from the callback aborts the decode.