This documentation is archived and is not being maintained.

BitmapCodecInfo Class

Provides information about an imaging codec.

Namespace:  System.Windows.Media.Imaging
Assembly:  PresentationCore (in PresentationCore.dll)

public abstract class BitmapCodecInfo
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

A BitmapCodecInfo can be obtain for each codec in Windows Presentation Foundation (WPF) by using the CodecInfo or the CodecInfo properties.

The following example demonstrates how to retrieve the Author property of a given BitmapEncoder.

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

System.Object
  System.Windows.Media.Imaging.BitmapCodecInfo

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Show: