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

Method write_image

src/lib.rs:310–316  ·  view source on GitHub ↗

Writes image data to Stream Deck device, changes must be flushed with `.flush()` before they will appear on the device!

(&self, key: u8, image_data: &[u8])

Source from the content-addressed store, hash-verified

308 /// Writes image data to Stream Deck device, changes must be flushed with `.flush()` before
309 /// they will appear on the device!
310 pub fn write_image(&self, key: u8, image_data: &[u8]) -> Result<(), StreamDeckError> {
311 let cache_entry = ImageCache { key, image_data: image_data.to_vec() };
312
313 self.image_cache.write()?.push(cache_entry);
314
315 Ok(())
316 }
317
318 /// Writes image data to Stream Deck device's lcd strip/screen as region.
319 /// Only Stream Deck Plus supports writing LCD regions, for Stream Deck Neo use write_lcd_fill

Callers 1

set_button_imageMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected