Share via


PngBitmapEncoder.Interlace プロパティ

定義

ポータブル ネットワーク グラフィックス (PNG) ビットマップをインターレースする必要があるかどうかを示す値を取得または設定します。

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

プロパティ値

PngInterlaceOption

Interlace 値のいずれか 1 つ。 既定値は、Default です。

次の例では、このプロパティを使用する方法を Interlace 示します。

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)

注釈

インターレースとは、2 つのフィールドに PNG フレームを表示するプロセスを指します。 1 つのフィールドにはフレームの偶数行が含まれており、もう 1 つのフィールドにはフレームの奇数行が含まれます。 PNG を表示すると、1 つのフィールドの行が最初に表示され、次に 2 番目のフィールドの行が表示されます。

適用対象