Abstract
Protected
constructorCreates a new image with the given size.
The image width in pixels.
The image height in pixels.
Protected
heightThe image height in pixels.
Protected
widthThe image width in pixels.
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.
Abstract
getReturns the RGBA color at the specified position.
The horizontal pixel position.
The vertical pixel position.
The RGBA color at the specified position.
Returns the image height in pixels.
The image height in pixels.
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.
Base class for all images.