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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET