LateBoundBitmapDecoder.CodecInfo 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得描述此轉碼器的資訊。
public:
virtual property System::Windows::Media::Imaging::BitmapCodecInfo ^ CodecInfo { System::Windows::Media::Imaging::BitmapCodecInfo ^ get(); };
public override System.Windows.Media.Imaging.BitmapCodecInfo CodecInfo { [System.Security.SecurityCritical] get; }
public override 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 Overrides ReadOnly Property CodecInfo As BitmapCodecInfo
屬性值
BitmapCodecInfo 的執行個體。 此屬性沒有預設值。 如果仍在下載晚期繫結的解碼器,這個屬性會傳回 null
。
- 屬性
範例
下列範例示範如何從 BitmapCodecInfo 物件讀取資訊,並將其傳送至字串。
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)