MCPcopy Create free account
hub / github.com/OpenActionAPI/rust-elgato-streamdeck / convert_image_async

Function convert_image_async

src/images.rs:62–64  ·  view source on GitHub ↗
(kind: Kind, image: DynamicImage)

Source from the content-addressed store, hash-verified

60#[cfg(feature = "async")]
61#[cfg_attr(docsrs, doc(cfg(feature = "async")))]
62pub fn convert_image_async(kind: Kind, image: DynamicImage) -> Result<Vec<u8>, StreamDeckError> {
63 Ok(tokio::task::block_in_place(move || convert_image(kind, image))?)
64}
65
66/// Converts image into image data depending on provided image format, can be safely ran inside [multi_thread](tokio::runtime::Builder::new_multi_thread) runtime
67#[cfg(feature = "async")]

Callers 1

set_button_imageMethod · 0.85

Calls 1

convert_imageFunction · 0.85

Tested by

no test coverage detected