FrameMetadata Class

Mutable per-frame settings of a displayed frame.

public sealed class FrameMetadata

Constructors

NameDescription
FrameMetadata()

FrameMetadata()

public FrameMetadata()

No documentation is available.

Properties

NameDescription
DurationGets or sets how long the frame is displayed. Defaults to FrameDuration.Zero.
HotspotGets 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).

Gets or sets how long the frame is displayed. Defaults to FrameDuration.Zero.

public FrameDuration Duration { get; set; }

Property value

FrameDuration

Remarks

The exact source timing is preserved on import. Encoders convert it to their own representation according to their FrameDurationRounding setting.

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).

public Point? Hotspot { get; set; }

Property value

Point?

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

NameDescription
Clone()Creates an independent copy of these settings.

Creates an independent copy of these settings.

public FrameMetadata Clone()

Returns

FrameMetadata A new instance with the same values.