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