共用方式為


BitmapCodecInfo.ContainerFormat 屬性

定義

取得識別轉碼器容器格式的值。

public:
 virtual property Guid ContainerFormat { Guid get(); };
public virtual Guid ContainerFormat { [System.Security.SecurityCritical] get; }
public virtual Guid ContainerFormat { get; }
[<get: System.Security.SecurityCritical>]
member this.ContainerFormat : Guid
member this.ContainerFormat : Guid
Public Overridable ReadOnly Property ContainerFormat As Guid

屬性值

轉碼器的容器格式。

屬性

範例

下列範例示範如何擷取 Author 指定 BitmapEncoder 的 屬性。 您可以使用相同的方法來擷取其他 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)

適用於

另請參閱