API Reference
Class
OfficeRasterFrames
An ordered snapshot of raster frame references with format-neutral animation timing.
Inheritance
- Object
- OfficeRasterFrames
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method OfficeRasterFrames.Transform
Accepted by parameters
Constructors
public OfficeRasterFrames(IEnumerable<OfficeRasterFrame> frames, Int32 playCount = 1) #Creates a nonempty frame sequence, retaining the frames and their mutable image buffers.
Parameters
- frames System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficeRasterFrame}
- One through 4096 frames in display or page order, with at most 50 million aggregate pixels.
- playCount System.Int32 = 1
- Total animation plays; zero means infinite. Static images and pages use one.
Methods
public IEnumerator<OfficeRasterFrame> GetEnumerator() #Returns:
IEnumerator<OfficeRasterFrame>Enumerates frames in display or page order.
public OfficeRasterFrames Transform(Func<OfficeRasterImage, OfficeRasterImage> transform, Func<OfficeRasterImage, ValueTuple<Int32, Int32>> outputSize = null, CancellationToken cancellationToken = default, Int64 additionalRetainedBytes = 0) #Returns:
OfficeRasterFramesMaps every frame into a new sequence, preserving duration and playback count.
Parameters
- transform System.Func{OfficeIMO.Drawing.OfficeRasterImage,OfficeIMO.Drawing.OfficeRasterImage}
- Operation returning an image for each source frame.
- outputSize System.Func{OfficeIMO.Drawing.OfficeRasterImage,System.ValueTuple{System.Int32,System.Int32}} = null
- Result dimensions, evaluated before mapping; omitted for operations that preserve dimensions.
- cancellationToken System.Threading.CancellationToken = default
- Observes cancellation during planning and between frames. Callbacks can also observe this token.
- additionalRetainedBytes System.Int64 = 0
- Nonnegative bytes retained alongside the source and result, such as an auxiliary image used by every callback. Callers account for this storage before mapping begins.
Returns
A complete new sequence. Failure or cancellation does not publish a partial sequence.