Compartir a través de


WmpBitmapEncoder Constructor

Definición

Inicializa una nueva instancia de la clase WmpBitmapEncoder.

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

Ejemplos

En el ejemplo siguiente se muestra cómo inicializar para WmpBitmapEncoder codificar una nueva imagen de mapa de bits.

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)

Se aplica a