PngInterlaceOption Výčet

Definice

Určuje, zda je během kódování propletený obrázek formátu PORTABLE Network Graphics (PNG).

public enum class PngInterlaceOption
public enum PngInterlaceOption
type PngInterlaceOption = 
Public Enum PngInterlaceOption
Dědičnost
PngInterlaceOption

Pole

Default 0

Určuje PngBitmapEncoder , zda má být obrázek prokládání.

Off 2

Výsledný rastrový obrázek není prokládání.

On 1

Výsledný rastrový obrázek je propletený.

Příklady

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

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ámečku PNG ve dvou polích. Jedno pole obsahuje sudé čáry rámce, zatímco druhé pole obsahuje liché čáry rámce. Když se zobrazí PNG, zobrazí se nejprve řádky v jednom poli a pak se zobrazí řádky v druhém poli.

Platí pro

Viz také