BitmapMetadata.Format Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value that identifies the format of the image.

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

public string Format {
	[SecurityCriticalAttribute]
	get;
}

Property Value

Type: System.String

The format of the bitmap image.

The following code example demonstrates how to read various properties of the BitmapMetadata object and send their values to a MessageBox as strings.

FileStream stream4 = new FileStream("image3.tif", FileMode.Create);
BitmapMetadata myBitmapMetadata2 = new BitmapMetadata("tiff");
TiffBitmapEncoder encoder4 = new TiffBitmapEncoder();
MessageBox.Show(myBitmapMetadata2.IsFixedSize.ToString());
MessageBox.Show(myBitmapMetadata2.IsReadOnly.ToString());
MessageBox.Show(myBitmapMetadata2.Format.ToString());
MessageBox.Show(myBitmapMetadata2.Location.ToString());
encoder4.Frames = decoder2.Frames;
encoder4.Save(stream4);
stream4.Close();

.NET Framework
Available since 3.0
Return to top
Show: