function createImageBitmap
#createImageBitmap(image: ImageBitmapSource,options?: ImageBitmapOptions,): Promise<ImageBitmap>
Create a new ImageBitmap
object from a given source.
Parameters #
#image: ImageBitmapSource
The image to create an ImageBitmap
from.
optional
#options: ImageBitmapOptions
The options for creating the ImageBitmap
.
Return Type #
Promise<ImageBitmap>
#createImageBitmap(): Promise<ImageBitmap>
Create a new ImageBitmap
object from a given source, cropping
to the specified rectangle.
Parameters #
#image: ImageBitmapSource
The image to create an ImageBitmap
from.
#sx: number
The x coordinate of the top-left corner of the sub-rectangle from
which the ImageBitmap
will be cropped.
#sy: number
The y coordinate of the top-left corner of the sub-rectangle from
which the ImageBitmap
will be cropped.
#sw: number
The width of the sub-rectangle from which the
ImageBitmap
will be cropped.
#sh: number
The height of the sub-rectangle from which the
ImageBitmap
will be cropped.
optional
#options: ImageBitmapOptions
The options for creating the ImageBitmap
.
Return Type #
Promise<ImageBitmap>