BitmapMetadata Class
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
'Declaration Public Class BitmapMetadata Inherits ImageMetadata Implements IEnumerable(Of String), IEnumerable 'Usage Dim instance As BitmapMetadata
public class BitmapMetadata extends ImageMetadata implements IEnumerable<String>, IEnumerable
public class BitmapMetadata extends ImageMetadata implements IEnumerable<String>, IEnumerable
You cannot use this managed class in XAML.
Metadata that is associated with an image is data that describes the image but is not necessary to display the image. Each supported bitmap image format handles metadata differently, but the facility for reading and writing metadata is the same.
Windows Presentation Foundation (WPF) supports the following image metadata schemas: Exchangeable image file (Exif), tEXt (PNG Textual Data), image file directory (IFD), International Press Telecommunications Council (IPTC), and Extensible Metadata Platform (XMP).
If a BitmapMetadata is exposed by a BitmapFrame that is obtained by using a BitmapDecoder, it is read-only by default and mutable operations will throw an exception. If it is exposed by a BitmapFrame that wraps another BitmapSource, it is mutable on construction.
The SetQuery and GetQuery methods can be used to construct and read metadata queries.
The following example demonstrates how to write metadata to a Tagged Image File Format (TIFF) image by using the IFD and Exif schemas.
Dim tiffMetadata As New BitmapMetadata("tiff") tiffMetadata.SetQuery("/ifd/{ushort=1000}", 9999) tiffMetadata.SetQuery("/ifd/{uint=1001}", 23456) tiffMetadata.SetQuery("/ifd/{uint=1002}", 34567) tiffMetadata.SetQuery("/ifd/PaddingSchema:padding", CType(4096, UInt32)) tiffMetadata.SetQuery("/ifd/exif", New BitmapMetadata("exif")) tiffMetadata.SetQuery("/ifd/exif/PaddingSchema:padding", CType(4096, UInt32))
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.