Tauri Core API - v2.6.0
    Preparing search index...

    Class Image

    An RGBA Image in row-major order from top to bottom.

    Hierarchy (View Summary)

    Index

    Accessors

    • get rid(): number

      Returns number

    Methods

    • 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 Promise<void>

    • Creates a new Image using RGBA data, in row-major order from top to bottom, and with specified width and height.

      Parameters

      Returns 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

      Returns 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

      • path: string

      Returns Promise<Image>