Skip to main content

ImageEncodingPolicy Enum

Definition​

Assembly:Avalonia.Controls.Documents
Package:Avalonia.Controls.Documents

How a serializer obtains the bytes to embed for an image whose encoded format the target format does not accept (or which carries only decoded pixels).

public enum ImageEncodingPolicy

Inheritance: Enum -> ImageEncodingPolicy

Fields​

NameDescription
PreserveEncodedOnlyPreserve original encoded bytes only. If the target rejects the format (or the image has no encoded bytes), skip it rather than re-encode.
ReencodeFromPixelsTranscode to a format the target accepts (decode → pixels → encode) using the built-in codec. The default.

PreserveEncodedOnly Field​

Preserve original encoded bytes only. If the target rejects the format (or the image has no encoded bytes), skip it rather than re-encode.

public Avalonia.Controls.Documents.Serialization.ImageEncodingPolicy PreserveEncodedOnly

ReencodeFromPixels Field​

Transcode to a format the target accepts (decode → pixels → encode) using the built-in codec. The default.

public Avalonia.Controls.Documents.Serialization.ImageEncodingPolicy ReencodeFromPixels