imwriteanimation
import { imwriteanimation } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Saves an Animation to a specified file.
The function imwriteanimation saves the provided Animation data to the specified file in an animated format. Supported formats depend on the implementation and may include formats like GIF, AVIF, APNG, or WEBP.
imwriteanimation(filename: EmbindString, animation: Animation, params: IntVector): boolean;2 available overloads
imwriteanimation(filename: EmbindString, animation: Animation): boolean;imwriteanimation(filename: EmbindString, animation: Animation, params: IntVector): boolean;filenameThe name of the file where the animation will be saved. The file extension determines the format.
animationA constant reference to an Animation struct containing the frames and metadata to be saved.
paramsOptional format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ...). These parameters are used to specify additional options for the encoding process. Refer to
cv::ImwriteFlagsfor details on possible parameters.
Returns true if the animation was successfully saved; 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.