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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈