Edit

Bagikan melalui


BitmapCodecInfo.ContainerFormat Property

Definition

Gets a value that identifies the container format for the codec.

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

Property Value

The container format of the codec.

Attributes

Examples

The following example demonstrates how to retrieve the Author property of a given BitmapEncoder. You can use the same approach to retrieve other 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)

Applies to

See also