PngBitmapEncoder.Interlace Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy mapa bitowa Portable Network Graphics (PNG) powinna być przeplatana.

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

Wartość właściwości

Jedna z Interlace wartości. Wartość domyślna to Default.

Przykłady

W poniższym przykładzie pokazano, jak używać Interlace właściwości.

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)

Uwagi

Interlacing odnosi się do procesu wyświetlania ramki PNG w dwóch polach. Jedno pole zawiera linie parzyste ramki, a drugie pole zawiera nieparzyste linie ramki. Po wyświetleniu pliku PNG wiersze w jednym polu są wyświetlane najpierw, a następnie wyświetlane są wiersze w drugim polu.

Dotyczy