PngInterlaceOption Wyliczenie

Definicja

Określa, czy obraz w formacie Portable Network Graphics (PNG) jest przeplatany podczas kodowania.

public enum class PngInterlaceOption
public enum PngInterlaceOption
type PngInterlaceOption = 
Public Enum PngInterlaceOption
Dziedziczenie
PngInterlaceOption

Pola

Default 0

Określa PngBitmapEncoder , czy obraz powinien być przeplatany.

Off 2

Wynikowy obraz mapy bitowej nie jest przeplatany.

On 1

Wynikowy obraz mapy bitowej jest przeplatany.

Przykłady

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

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

Zobacz też