OfficeRasterFrames
OfficeIMO.Drawing
An ordered snapshot of raster frame references with format-neutral animation timing.
Inheritance
- object
- OfficeRasterFrames
Usage
Explore 5 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
Accepted by parameters 2
Constructors
public OfficeRasterFrames(IEnumerable<OfficeRasterFrame> frames, int 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 int = 1
- Total animation plays; zero means infinite. Static images and pages use one.
Methods
public IEnumerator<OfficeRasterFrame> GetEnumerator() #Enumerates frames in display or page order.
Returns
IEnumerator<OfficeRasterFrame>public OfficeRasterFrames Resize(OfficeRasterResizeOptions options, CancellationToken cancellationToken = default, long additionalRetainedBytes = 0) #Resizes every frame through shared fit planning, retaining timing and playback count.
Parameters
- options OfficeIMO.Drawing.OfficeRasterResizeOptions
- cancellationToken System.Threading.CancellationToken = default
- additionalRetainedBytes long = 0
Returns
OfficeRasterFramespublic OfficeRasterFrames Resize(int percentage, CancellationToken cancellationToken = default, long additionalRetainedBytes = 0) #Resizes each frame by a positive percentage using Bicubic sampling, preserving timing and playback count.
Parameters
- percentage int
- cancellationToken System.Threading.CancellationToken = default
- additionalRetainedBytes long = 0
Returns
OfficeRasterFramespublic OfficeRasterFrames Transform(Func<OfficeRasterImage, OfficeRasterImage> transform, Func<OfficeRasterImage, ValueTuple<int, int>>? outputSize = null, CancellationToken cancellationToken = default, long additionalRetainedBytes = 0) #Maps 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<int, int>>? = 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 long = 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
OfficeRasterFrames A complete new sequence. Failure or cancellation does not publish a partial sequence.Inherited Methods
Properties
public OfficeRasterFrame this[int index] { get; } #Frame or page at the requested zero-based index.
Parameters
- index int