MetadataHandling Enum
Controls what an encoder does with image metadata it cannot represent.
public enum MetadataHandlingRemarks
Animation settings and frame durations are structural data, not metadata: they are never affected by this policy. A cursor hotspot (FrameMetadata.Hotspot) is metadata for every output but cursors and animated cursors, which always store one. Note that dropping ImageMetadata.Orientation or ImageMetadata.IccProfile changes how viewers display the pixels; consider AutoOrient before stripping metadata. Payloads the format can store are validated when written: a malformed EXIF, ICC or XMP payload throws an InvalidImageContentException with MetadataHandling.Strict and MetadataHandling.DiscardUnsupported.
Fields
| Name | Value | Description |
|---|---|---|
Strict | 0 | Writes all supported metadata and throws an UnsupportedImageFeatureException if any metadata cannot be represented. This is the default. |
DiscardUnsupported | 1 | Writes all supported metadata and silently discards metadata the format cannot represent. |
Strip | 2 | Writes no optional metadata (profiles, EXIF, XMP, text, resolution, orientation, a cursor hotspot the format has no field for). |