Protected
dataThe image data.
Protected
heightThe image height in pixels.
Protected
widthThe image width in pixels.
Creates and returns an animation player for this animation. The actual drawing is done by the specified callback which is called for each frame and receives the image to render.
Callback to call on each frame update. This callback is responsible for actually showing the animation frame to the user.
The created animation player. You have to call the start() method on it to start the animation.
Draws the image onto the given rendering context.
The rendering context to draw the image to.
Optional horizontal target position. Defaults to 0.
Optional vertical target position. Defaults to 0.
Returns the RGBA color at the specified position.
The horizontal pixel position.
The vertical pixel position.
The RGBA color at the specified position.
Returns a copy of the image data. Each byte contains two 4-bit colors.
The image data.
Returns the image height in pixels.
The image height in pixels.
Returns the number of animation updates.
The number of animation updates.
Returns the animation update with the given index.
Animation update index.
The animation update.
Returns the image width in pixels.
The image width in pixels.
Creates and returns a new canvas containing the image.
The created canvas.
Creates and returns an image data URL.
Optional
type: stringOptional image mime type. Defaults to image/png.
Optional
quality: numberOptional quality parameter for encoder. For image/jpeg this is the image quality between 0 and 1 with a default value of 0.92.
The created data URL.
Creates and returns a HTML image.
Optional
type: stringOptional image mime type. Defaults to image/png.
Optional
quality: numberOptional quality parameter for encoder. For image/jpeg this is the image quality between 0 and 1 with a default value of 0.92.
The created HTML image.
Static
fromParses a end animation from the given array and returns it.
The array containing the two encoded MSQ blocks with the base frame and animation data.
The parsed end animation.
Static
fromReads the end animation from the given blob and returns it.
The END.CPA blob.
The read end animation.
Contains the base frame of the ending animation but also provides methods to access the animation information. To simply play the animation it is recommended to use the [[EndingPlayer]] class.