Exporter (0) Imprimer
Développer tout

BitmapMetadata, classe

Provides support for reading and writing metadata to and from a bitmap image.

Espace de noms: System.Windows.Media.Imaging
Assembly : PresentationCore (dans presentationcore.dll)
Espace de noms XML :  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public class BitmapMetadata : ImageMetadata, IEnumerable<string>, IEnumerable
public class BitmapMetadata extends ImageMetadata implements IEnumerable<String>, 
	IEnumerable
public class BitmapMetadata extends ImageMetadata implements IEnumerable<String>, 
	IEnumerable
Vous ne pouvez pas utiliser cette classe managée dans 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.

BitmapMetadata tiffMetadata = 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", (UInt32)4096);
tiffMetadata.SetQuery("/ifd/exif", new BitmapMetadata("exif"));
tiffMetadata.SetQuery("/ifd/exif/PaddingSchema:padding", (UInt32)4096);

Les membres statiques publics (Shared en Visual Basic) de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.

Microsoft .NET Framework 3.0 est pris en charge sur Windows Vista, Microsoft Windows XP SP2 et Windows Server 2003 SP1.

.NET Framework

Prise en charge dans : 3.0

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft