WmpBitmapEncoder WmpBitmapEncoder WmpBitmapEncoder Constructor

定義

WmpBitmapEncoder クラスの新しいインスタンスを初期化します。Initializes a new instance of the WmpBitmapEncoder class.

public:
 WmpBitmapEncoder();
[System.Security.SecurityCritical]
public WmpBitmapEncoder ();
Public Sub New ()

次の例は、をWmpBitmapEncoder初期化して新しいビットマップイメージをエンコードする方法を示しています。The following example demonstrates how to initialize a WmpBitmapEncoder to encode a new bitmap image.

FileStream^ stream = gcnew FileStream("new.wdp", FileMode::Create);
WmpBitmapEncoder^ encoder = gcnew WmpBitmapEncoder();
TextBlock^ myTextBlock = gcnew TextBlock();
myTextBlock->Text = "Codec Author is: " + encoder->CodecInfo->Author->ToString();
encoder->Frames->Add(BitmapFrame::Create(image));
encoder->Save(stream);
FileStream stream = new FileStream("new.wdp", FileMode.Create);
WmpBitmapEncoder encoder = new WmpBitmapEncoder();
TextBlock myTextBlock = new TextBlock();
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString();
encoder.Frames.Add(BitmapFrame.Create(image));
encoder.Save(stream);
Dim stream As New FileStream("new.wdp", FileMode.Create)
Dim encoder As New WmpBitmapEncoder()
Dim myTextBlock As New TextBlock()
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString()
encoder.Frames.Add(BitmapFrame.Create(image))
encoder.Save(stream)

適用対象