PngBitmapEncoder.Interlace Vlastnost

Definice

Získá nebo nastaví hodnotu, která označuje, zda by se měl rastrový obrázek PNG (Portable Network Graphics) protínat.

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

Hodnota vlastnosti

PngInterlaceOption

Jedna z Interlace hodnot. Výchozí formát je Default.

Příklady

Následující příklad ukazuje, jak použít Interlace vlastnost.

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)

Poznámky

Prokládání odkazuje na proces zobrazení rámce PNG ve dvou polích. Jedno pole obsahuje sudé čáry rámce a druhé pole obsahuje liché čáry rámce. Při zobrazení PNG se nejprve zobrazí řádky v jednom poli a pak se zobrazí řádky v druhém poli.

Platí pro