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