BitmapDecoder.CodecInfo 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得描述此轉碼器的資訊。
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
屬性值
BitmapCodecInfo 的執行個體。 此屬性沒有預設值。
- 屬性
範例
下列程式碼範例示範如何從 BitmapCodecInfo 物件讀取資訊,並將它傳送至字串。
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)
備註
每個編解碼器都需要實 BitmapCodecInfo 作。