BitmapMetadata(String) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of BitmapMetadata for use with the specified image format.
public:
BitmapMetadata(System::String ^ containerFormat);
[System.Security.SecurityCritical]
public BitmapMetadata (string containerFormat);
public BitmapMetadata (string containerFormat);
[<System.Security.SecurityCritical>]
new System.Windows.Media.Imaging.BitmapMetadata : string -> System.Windows.Media.Imaging.BitmapMetadata
new System.Windows.Media.Imaging.BitmapMetadata : string -> System.Windows.Media.Imaging.BitmapMetadata
Public Sub New (containerFormat As String)
Parameters
- containerFormat
- String
The format of the bitmap image, specified as "gif", "jpg", "png", or "tiff".
- Attributes
Exceptions
containerFormat
is null
.
Examples
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);
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))
Applies to
Collaborer avec nous sur GitHub
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner les problèmes et les demandes de tirage. Pour plus d’informations, consultez notre guide du contributeur.