BmpBitmapEncoder Konstruktor

Definition

Initialisiert eine neue Instanz der BmpBitmapEncoder-Klasse.

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

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie eine BmpBitmapEncoder initialisiert wird, um ein neues Bitmapbild zu codieren.

FileStream^ stream = gcnew FileStream("new.bmp", FileMode::Create);
BmpBitmapEncoder^ encoder = gcnew BmpBitmapEncoder();
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.bmp", FileMode.Create);
BmpBitmapEncoder encoder = new BmpBitmapEncoder();
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.bmp", FileMode.Create)
Dim encoder As New BmpBitmapEncoder()
Dim myTextBlock As New TextBlock()
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString()
encoder.Frames.Add(BitmapFrame.Create(image))
encoder.Save(stream)

Gilt für: