import { createImageBitmap } from "https://deno.land/x/deno@v2.0.4/ext/canvas/lib.deno_canvas.d.ts";
Create a new ImageBitmap
object from a given source.
Parameters
image: ImageBitmapSource
The image to create an ImageBitmap
from.
optional
options: ImageBitmapOptionsThe options for creating the ImageBitmap
.
Returns
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.
The x coordinate of the top-left corner of the sub-rectangle from
which the ImageBitmap
will be cropped.
The y coordinate of the top-left corner of the sub-rectangle from
which the ImageBitmap
will be cropped.
The width of the sub-rectangle from which the
ImageBitmap
will be cropped.
The height of the sub-rectangle from which the
ImageBitmap
will be cropped.
optional
options: ImageBitmapOptionsThe options for creating the ImageBitmap
.
Returns
Promise<ImageBitmap>