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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應