imdecodeanimation
import { imdecodeanimation } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Loads frames from an animated image buffer into an Animation structure.
The function imdecodeanimation loads frames from an animated image buffer (e.g., GIF, AVIF, APNG, WEBP) into the provided Animation struct.
imdecodeanimation(buf: Mat, animation: Animation, start: number, count: number): boolean;3 available overloads
imdecodeanimation(buf: Mat, animation: Animation): boolean;imdecodeanimation(buf: Mat, animation: Animation, start: number): boolean;imdecodeanimation(buf: Mat, animation: Animation, start: number, count: number): boolean;bufA reference to an InputArray containing the image buffer.
animationOutput destination, filled by the native operation. A reference to an Animation structure where the loaded frames will be stored. It should be initialized before the function is called.
startThe index of the first frame to load. This is optional and defaults to 0.
countThe number of frames to load. This is optional and defaults to 32767.
Returns true if the buffer was successfully loaded and frames were extracted; returns false otherwise.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.