Freigeben über


GifBitmapEncoder Konstruktor

Definition

Initialisiert eine neue Instanz der GifBitmapEncoder-Klasse.

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

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie sie ein GifBitmapEncoder neues Bitmapbild initialisieren.

FileStream^ stream = gcnew FileStream("new.gif", FileMode::Create);
GifBitmapEncoder^ encoder = gcnew GifBitmapEncoder();
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.gif", FileMode.Create);
GifBitmapEncoder encoder = new GifBitmapEncoder();
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.gif", FileMode.Create)
Dim encoder As New GifBitmapEncoder()
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