Expand description
§egui_thumbhash
This crate adds an image loader to easily use thumbhashes in egui. It also includes a ThumbhashImage widget to easily display the thumbhash while the image is loading.
Internally we use the thumbhash crate to load the images.
For a showcase, check the gallery example.
Structs§
- Thumbhash
Image - A widget that displays a thumbhash while the actual image is loading.
- Thumbhash
Image Loader - The
ImageLoaderimplementation for thumbhash images.
Functions§
- register
- Register the thumbhash image loader with the given egui context. Do this once while the app is initializing.
- thumbhash_
to_ uri - Convert a thumbhash to a URI that can be loaded by the image loader.
- uri_
to_ thumbhash - Get the thumbhash data from the thumbhash URI. Returns None if the URI is not a valid thumbhash URI. Will not check whether the thumbhash is valid.