Skip to main content

Class: ImageIO

Extends

Constructors

new ImageIO()

new ImageIO(raw: RawTaskIO<"image", string>): ImageIO

Parameters

ParameterType

raw

RawTaskIO<"image", string>

Returns

ImageIO

Inherited from

TaskIO.constructor

Properties

raw

readonly raw: RawTaskIO<"image", string>;

Inherited from

TaskIO.raw

Accessors

arrayBuffer

get arrayBuffer(): ArrayBuffer

Returns

ArrayBuffer


blob

get blob(): Blob

Returns

Blob


buffer

get buffer(): Buffer

Returns

Buffer


data

get data(): RawData

Returns

RawData

Inherited from

TaskIO.data


dataUrl

get dataUrl(): `data:image/png;base64,${string}`

Returns

`data:image/png;base64,${string}`


key

get key(): Key

Returns

Key

Inherited from

TaskIO.key

Methods

toJSON()

toJSON(): RawTaskIO<"image", string>

Returns

RawTaskIO<"image", string>

Inherited from

TaskIO.toJSON


create()

static create(image: ImageType): Promise<ImageIO>

Parameters

ParameterType

image

ImageType

Returns

Promise<ImageIO>