fromBytes

external fun fromBytes(bytes: Uint8Array<*>): Promise<Image>(source)
external fun fromBytes(bytes: ArrayBuffer): Promise<Image>(source)

Creates a new image using the provided bytes by inferring the file format.

Only ico and png are supported (based on activated feature flag).

Note that you need the image-ico or image-png Cargo features to use this API. To enable it, change your Cargo.toml file:

[dependencies]
tauri = { version = "...", features = ["...", "image-png"] }

Since

2.0.0