How many times to repeat the animation (-1 = forever, 0 = play once)
The animation's duration (in ms)
The animation's height
The animation's width
StaticdecodeDecodes an animated GIF, APNG or WebP into fully composited frames (still images become a single frame)
The binary data to decode
Whether to stop decoding after the first frame
Encodes the animation as APNG (animated PNG, lossless and with full alpha). Viewers without APNG support show the first frame
The zlib compression level (0-9), higher is smaller but slower
Encodes the animation as GIF
1-100, scales the palette size from 8 colors (1) to 256 colors (90 and above)
Encodes the animation as lossless animated WebP
Resizes the animation to the given dimensions, scaling every frame and its offsets proportionally. Use Image.RESIZE_AUTO as either width or height to automatically preserve the aspect ratio.
Returns a new animation of the same class containing a range of this one's frames (same semantics as Array.prototype.slice)
Optionalstart: numberOptionalend: numberReturns a string representation of an array.
An animation: an array of frames that can be decoded from and encoded to GIF, APNG and WebP. Array methods like map and filter return plain arrays.