BitmapEncoder.Create Method (Guid)


Creates a BitmapEncoder from a Guid that identifies the desired bitmap format.

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

public static BitmapEncoder Create(
	Guid containerFormat


Type: System.Guid

Identifies the desired bitmap encoding format.

Return Value

Type: System.Windows.Media.Imaging.BitmapEncoder

A BitmapEncoder that can encode to the specified containerFormat.

Exception Condition

The containerFormat is Empty.

This method is provided for extensibility purposes only. Codec authors must generate their own Guid to identify their newly created encoder. Use the derived BitmapEncoder classes, such as the BmpBitmapEncoder class, to create an encoder for a built in codec.

.NET Framework
Available since 3.0
Return to top