Module image

Source
Expand description

This module provides the image component and related utilities for rendering images in Tessera UI.

It supports loading image data from file paths or raw bytes, decoding them into a format suitable for GPU rendering, and displaying them as part of the UI component tree. The main entry point is the [image] component, which can be sized explicitly or use the intrinsic dimensions of the image. Image data should be loaded and decoded outside the main UI loop for optimal performance, using load_image_from_source.

Typical use cases include displaying static images, icons, or dynamically loaded pictures in UI layouts. The module is designed to integrate seamlessly with Tessera’s stateless component model and rendering pipeline.

Re-exports§

pub use crate::pipelines::image::ImageData;

Structs§

ImageArgs
Arguments for the image component.
ImageArgsBuilder
Builder for ImageArgs.

Enums§

ImageArgsBuilderError
Error type for ImageArgsBuilder
ImageSource
Specifies the source for image data, which can be either a file path or raw bytes.

Functions§

image
A component that renders an image.
load_image_from_source
Decodes an image from a given ImageSource.