Encapsulates a metadata property to be included in an image file. Not inheritable.
Assembly: System.Drawing (in System.Drawing.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The data consists of: an identifier, the length (in bytes) of the property, the property type, and a pointer to the property value.
A is not intended to be used as a stand-alone object. A object is intended to be used by classes that are derived from Image. A object is used to retrieve and to change the metadata of existing image files, not to create the metadata. Therefore, the class does not have a defined Public constructor, and you cannot create an instance of a object.
To work around the absence of a Public constructor, use an existing object instead of creating a new instance of the class. For more information, see Image.GetPropertyItem.
The following code example demonstrates how to read and display the metadata in an image file using the class and the Image.PropertyItems property.
This example is designed to be used in a Windows Form that imports the System.Drawing.Imaging namespace. Paste the code into the form and change the path to fakePhoto.jpg to point to an image file on your system. Call the ExtractMetaData method when handling the form's Paint event, passing e as PaintEventArgs.