Skip to main content


Canvas API for Deno, ported from canvaskit-wasm (Skia).
Go to Latest
interface SkAnimatedImage
import { type SkAnimatedImage } from "";

See SkAnimatedImage.h for more information on this class.


decodeNextFrame(): number

Decodes the next frame. Returns -1 when the animation is on the last frame.

getFrameCount(): number

Return the total number of frames in the animation.

getRepetitionCount(): number

Return the repetition count for this animation.

height(): number

Returns the possibly scaled height of the image.

makeImageAtCurrentFrame(): SkImage | null

Returns a still image of the current frame or null if there is no current frame.

reset(): void

Reset the animation to the beginning.

width(): number

Returns the possibly scaled width of the image.