FrameMetadata Class
Mutable per-frame settings of a displayed frame.
public sealed class FrameMetadataConstructors
| Name | Description |
|---|---|
| FrameMetadata() |
FrameMetadata()
public FrameMetadata()No documentation is available.
Properties
| Name | Description |
|---|---|
| Duration | Gets or sets how long the frame is displayed. Defaults to FrameDuration.Zero. |
| Hotspot | Gets or sets the cursor hotspot of the frame: the pixel that designates the pointer position, in stored-pixel coordinates from the top-left corner. Defaults to null (the frame is not a cursor image). |
Duration
FrameMetadata.csGets or sets how long the frame is displayed. Defaults to FrameDuration.Zero.
public FrameDuration Duration { get; set; }Property value
Remarks
The exact source timing is preserved on import. Encoders convert it to their own representation according to their FrameDurationRounding setting.
Hotspot
FrameMetadata.csGets or sets the cursor hotspot of the frame: the pixel that designates the pointer position, in stored-pixel coordinates from the top-left corner. Defaults to null (the frame is not a cursor image).
public Point? Hotspot { get; set; }Property value
Exceptions
ArgumentOutOfRangeException- A coordinate is negative, or the point is outside the frame these settings belong to.
Remarks
The hotspot is metadata, never a pixel offset. It is read from cursor (.cur) and animated cursor (.ani) files and written back to them (the top-left corner when the frame has none). Every other output cannot store it: a frame that has one is rejected unless the encoder's ImageEncoder.MetadataHandling allows discarding it.
The hotspot of an attached frame is always inside that frame. Geometry operations (crop, resize, rotations, mirrors, auto-orient) move it with the pixel it designates, and fail instead of dropping it when that pixel is removed.
Methods
| Name | Description |
|---|---|
| Clone() | Creates an independent copy of these settings. |
Clone()
FrameMetadata.csCreates an independent copy of these settings.
public FrameMetadata Clone()Returns
FrameMetadata A new instance with the same values.