anything image representation that can be constructed into an ImageBitmap
using constructImageBitmapSource
Optional
width: numberwhen using Uint8Array
, Uint8ClampedArray
, ArrayBuffer
, or Array<number>
as img_src
, you must necessarily provide the width of the image
Optional
crop_rect: Rectspecify a cropping rectangle
Optional
bitmap_options: ImageBitmapOptionsthese are ImageBitmapOptions that can be used for optionally cropping the img_src
, changing its colorSpace, etc...
Optional
blob_options: ImageEncodeOptionsspecify type
: ImageMIMEType and quality
: number to encode your output Blob into
note that when using Uint8Array
, Uint8ClampedArray
, ArrayBuffer
, or Array<number>
, your should provide a width
as the second argument to this function
you can also provide an optional image element as the third argument to load the given img_src onto, otherwise a new one will be made
load an image as a
Blob
, with the chosen optionaltype
encoding (default is "image/png").possible image sources are:
string
string
string
Uint8Array
,Uint8ClampedArray
,ArrayBuffer
, orArray<number>
ImageBitmapSource
, which includes:Blob
ImageData
HTMLCanvasElement
orOffscreenCanvas
HTMLImageElement
orSVGImageElement
orHTMLVideoElement
ImageBitmap