Defined in: image.ts:41
A native image registered in the host. Create with fromPath/fromBytes
(and fromRGBA for raw pixels) and pass to tray.setIcon / setIcon.
readonlyrid:number
Defined in: image.ts:43
The host-side image registry id.
close():
Promise<void>
Defined in: image.ts:132
Releases the image in the host.
Promise<void>
rgba():
Promise<Uint8Array<ArrayBufferLike> |undefined>
Defined in: image.ts:116
The raw RGBA pixels this image was built from. Only images created via
Image.fromRGBA/new carry pixels; path/PNG-loaded images
resolve to undefined until C-layer decode lands (GAP.md B11).
Promise<Uint8Array<ArrayBufferLike> | undefined>
size():
Promise<{height:number;width:number; } |null>
Defined in: image.ts:124
Pixel dimensions (null when unknown — see Image.rgba).
Promise<{ height: number; width: number; } | null>
staticfromAppIconResource():Promise<Image>
Defined in: image.ts:53
Loads the app's embedded Windows icon resource (resource id 32512 — what the NSIS/WiX installers brand). Windows-only: throws elsewhere.
Promise<Image>
staticfromBytes(bytes):Promise<Image>
Defined in: image.ts:74
Loads an image from raw bytes.
number[] | Uint8Array<ArrayBufferLike>
Promise<Image>
staticfromPath(path):Promise<Image>
Defined in: image.ts:67
Loads an image from a file path.
string
Promise<Image>
staticfromRGBA(rgba,width,height):Promise<Image>
Defined in: image.ts:84
Builds an image from RGBA pixel data (upstream name: Image.new).
number[] | Uint8Array<ArrayBufferLike>
number
number
Promise<Image>
staticnew(rgba,width,height):Promise<Image>
Defined in: image.ts:103
Upstream-parity alias of Image.fromRGBA.
number[] | Uint8Array<ArrayBufferLike>
number
number
Promise<Image>
ImageLike =
string|Image|Uint8Array|ArrayBuffer|number[] |null
Defined in: image.ts:26
Anything an icon-accepting API takes (path / Image / raw bytes / none).
JsImage =
Exclude<ImageLike,null>
Defined in: image.ts:35
Icon-parameter widening (tauri 2.12 JsImage): non-null ImageLike.
fromBase64(
b64):Uint8Array
Defined in: image.ts:18
Decodes a base64 string into bytes (chunked, for large payloads).
string
Uint8Array
toBase64(
bytes):string
Defined in: image.ts:8
Converts bytes to a base64 string for the wire.
Uint8Array
string
transformImage(
image):Promise<{image_id?:number;path?:string; } |null>
Defined in: image.ts:142
Normalizes an icon argument into the wire shape: a path string stays a
path, an Image becomes its registry id, and raw bytes are registered
(decoded host-side) first — a port of @tauri-apps/api transformImage.
Promise<{ image_id?: number; path?: string; } | null>