BitmapDecoder.CodecInfo Property

Definition

Gets information that describes this codec.

C#
public virtual System.Windows.Media.Imaging.BitmapCodecInfo CodecInfo { [System.Security.SecurityCritical] get; }
C#
public virtual System.Windows.Media.Imaging.BitmapCodecInfo CodecInfo { get; }

Property Value

An instance of BitmapCodecInfo. This property has no default value.

Attributes

Examples

The following code example shows how to read information from a BitmapCodecInfo object and send it to a string.

C#
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);

Remarks

A BitmapCodecInfo implementation is required for every codec.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also