image
이 콘텐츠는 아직 번역되지 않았습니다.
Classes
Section titled “Classes”An RGBA Image in row-major order from top to bottom.
Extends
Section titled “Extends”Accessors
Section titled “Accessors”get rid(): numberReturns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L318
Methods
Section titled “Methods”close()
Section titled “close()”close(): Promise<void>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.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/core.ts#L330
rgba()
Section titled “rgba()”rgba(): Promise<Uint8Array<ArrayBufferLike>>Returns the RGBA data for this image, in row-major order from top to bottom.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L89
size()
Section titled “size()”size(): Promise<ImageSize>Returns the size of this image.
Returns
Section titled “Returns”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L96
fromBytes()
Section titled “fromBytes()”static fromBytes(bytes): Promise<Image>Creates 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"] }Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bytes | number[] | ArrayBuffer | Uint8Array<ArrayBufferLike> |
Returns
Section titled “Returns”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L62
fromPath()
Section titled “fromPath()”static fromPath(path): Promise<Image>Creates 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"] }Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
path | string |
Returns
Section titled “Returns”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L82
static new( rgba, width,height): Promise<Image>Creates a new Image using RGBA data, in row-major order from top to bottom, and with specified width and height.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
rgba | number[] | ArrayBuffer | Uint8Array<ArrayBufferLike> |
width | number |
height | number |
Returns
Section titled “Returns”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L37
Interfaces
Section titled “Interfaces”ImageSize
Section titled “ImageSize”Properties
Section titled “Properties”| Property | Type | Defined in |
|---|---|---|
height | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L13 |
width | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L11 |
Type Aliases
Section titled “Type Aliases”MenuIcon
Section titled “MenuIcon”type MenuIcon: | NativeIcon | string | Image | Uint8Array | ArrayBuffer | number[];A type that represents an icon that can be used in menu items.
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L17
Functions
Section titled “Functions”transformImage()
Section titled “transformImage()”function transformImage<T>(image): TTransforms image from various types into a type acceptable by Rust.
See tauri::image::JsImage for more information. Note the API signature is not stable and might change.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
image | | null | string | number[] | ArrayBuffer | Uint8Array<ArrayBufferLike> | Image |
Returns
Section titled “Returns”T
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/image.ts#L107
© 2026 Tauri Contributors. CC-BY / MIT