import type { WebpAnimation } from './types'; /** * Decode an animated WebP container into its constituent frames + the * canvas-level metadata needed to play them back (loop count, background * colour, per-frame timing/positioning/composition rules). * * Container layout (extended-format WebP with animation): * * RIFF / WEBP wrapper * VP8X chunk — extended-format flags + canvas dimensions * ANIM chunk — 4-byte BG color (ARGB) + 2-byte loop count * ANMF chunk — frame N: 16-byte header + frame's own chunks * ANMF chunk — frame N+1 * … * * Each ANMF chunk's payload is a header followed by a sequence of * sub-chunks (typically a single VP8L; possibly a VP8X+ALPH+VP8 trio * for lossy frames). We dispatch each frame's payload into the * lossless decoder. * * Reference: WebP Container Specification, "Animation". */ /** Decode `buffer` as an animated WebP. Throws if the file isn't animated. */ export declare function decodeAnimation(buffer: Uint8Array | ArrayBuffer): WebpAnimation;