Crate egui_thumbhash

Crate egui_thumbhash 

Source
Expand description

§egui_thumbhash

egui_ver Latest version Documentation unsafe forbidden License

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§

ThumbhashImage
A widget that displays a thumbhash while the actual image is loading.
ThumbhashImageLoader
The ImageLoader implementation 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.