Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Static
newCreates a new Image using RGBA data, in row-major order from top to bottom, and with specified width and height.
Static
fromCreates a new image using the provided bytes by inferring the file format. If the format is known, prefer [@link Image.fromPngBytes] or [@link Image.fromIcoBytes].
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"] }
Static
fromCreates a new image using the provided path.
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"] }
Returns the RGBA data for this image, in row-major order from top to bottom.
An RGBA Image in row-major order from top to bottom.