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§
- Image
Args - Arguments for the
image
component. - Image
Args Builder - Builder for
ImageArgs
.
Enums§
- Image
Args Builder Error - Error type for ImageArgsBuilder
- Image
Source - 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
.