Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeRasterFrames

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
1d5ef38d1e0b with working tree changes
Implements
IReadOnlyList<OfficeRasterFrame> IReadOnlyCollection<OfficeRasterFrame> IEnumerable<OfficeRasterFrame> IEnumerable
Modifiers
sealed
Attributes
DefaultMember("Item")

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.

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> required
One through 4096 frames in display or page order, with at most 50 million aggregate pixels.
playCount int = 1 optional
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>
Resize 2 overloads
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 required
cancellationToken System.Threading.CancellationToken = default optional
additionalRetainedBytes long = 0 optional
public 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 required
cancellationToken System.Threading.CancellationToken = default optional
additionalRetainedBytes long = 0 optional
public 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> required
Operation returning an image for each source frame.
outputSize System.Func<OfficeIMO.Drawing.OfficeRasterImage, System.ValueTuple<int, int>>? = null optional
Result dimensions, evaluated before mapping; omitted for operations that preserve dimensions.
cancellationToken System.Threading.CancellationToken = default optional
Observes cancellation during planning and between frames. Callbacks can also observe this token.
additionalRetainedBytes long = 0 optional
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.

Properties

public int Count { get; } #

Number of frames or pages.

public OfficeRasterFrame this[int index] { get; } #

Frame or page at the requested zero-based index.

Parameters

index int required
public int PlayCount { get; } #

Total animation plays; zero means infinite.