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])
| 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 |