Bagikan melalui


BitmapEncoder.CodecInfo Properti

Definisi

Mendapatkan informasi yang menjelaskan codec ini.

public:
 virtual property System::Windows::Media::Imaging::BitmapCodecInfo ^ CodecInfo { System::Windows::Media::Imaging::BitmapCodecInfo ^ get(); };
public virtual System.Windows.Media.Imaging.BitmapCodecInfo CodecInfo { [System.Security.SecurityCritical] get; }
public virtual System.Windows.Media.Imaging.BitmapCodecInfo CodecInfo { get; }
[<get: System.Security.SecurityCritical>]
member this.CodecInfo : System.Windows.Media.Imaging.BitmapCodecInfo
member this.CodecInfo : System.Windows.Media.Imaging.BitmapCodecInfo
Public Overridable ReadOnly Property CodecInfo As BitmapCodecInfo

Nilai Properti

Instans BitmapCodecInfo.

Atribut

Contoh

Contoh berikut menunjukkan cara membaca informasi dari BitmapCodecInfo objek dan mengirimkannya ke string.

FileStream stream = new FileStream("empty.tif", FileMode.Create);
TiffBitmapEncoder encoder = new TiffBitmapEncoder();
TextBlock myTextBlock = new TextBlock();
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString();
encoder.Frames.Add(BitmapFrame.Create(image));
MessageBox.Show(myPalette.Colors.Count.ToString());
encoder.Save(stream);
Dim stream As New FileStream("empty.tif", FileMode.Create)
Dim encoder As New TiffBitmapEncoder()
Dim myTextBlock As New TextBlock()
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString()
encoder.Frames.Add(BitmapFrame.Create(image))
MessageBox.Show(myPalette.Colors.Count.ToString())
encoder.Save(stream)

Keterangan

Implementasi BitmapCodecInfo diperlukan untuk setiap codec.

Berlaku untuk

Lihat juga