PngBitmapEncoder.Interlace Proprietà

Definizione

Ottiene o imposta un valore che indica se la bitmap PNG (Portable Network Graphics) deve interlacciare.

public:
 property System::Windows::Media::Imaging::PngInterlaceOption Interlace { System::Windows::Media::Imaging::PngInterlaceOption get(); void set(System::Windows::Media::Imaging::PngInterlaceOption value); };
public System.Windows.Media.Imaging.PngInterlaceOption Interlace { get; set; }
member this.Interlace : System.Windows.Media.Imaging.PngInterlaceOption with get, set
Public Property Interlace As PngInterlaceOption

Valore della proprietà

PngInterlaceOption

Uno dei valori di Interlace. Il valore predefinito è Default.

Esempio

Nell'esempio seguente viene illustrato come utilizzare il Interlace proprietà.

FileStream^ stream = gcnew FileStream("new.png", FileMode::Create);
PngBitmapEncoder^ encoder = gcnew PngBitmapEncoder();
TextBlock^ myTextBlock = gcnew TextBlock();
myTextBlock->Text = "Codec Author is: " + encoder->CodecInfo->Author->ToString();
encoder->Interlace = PngInterlaceOption::On;
encoder->Frames->Add(BitmapFrame::Create(image));
encoder->Save(stream);
FileStream stream = new FileStream("new.png", FileMode.Create);
PngBitmapEncoder encoder = new PngBitmapEncoder();
TextBlock myTextBlock = new TextBlock();
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString();
encoder.Interlace = PngInterlaceOption.On;
encoder.Frames.Add(BitmapFrame.Create(image));
encoder.Save(stream);
Dim stream As New FileStream("new.png", FileMode.Create)
Dim encoder As New PngBitmapEncoder()
Dim myTextBlock As New TextBlock()
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString()
encoder.Interlace = PngInterlaceOption.On
encoder.Frames.Add(BitmapFrame.Create(image))
encoder.Save(stream)

Commenti

L'interlacciamento fa riferimento al processo di visualizzazione di un frame PNG in due campi. Un campo contiene le righe pari del frame e l'altro campo contiene le righe dispari del frame. Quando viene visualizzato il file PNG, le righe in un campo vengono visualizzate prima e quindi vengono visualizzate le righe nel secondo campo.

Si applica a