Struct elgato_streamdeck::images::ImageRect
source · pub struct ImageRect {
pub w: u16,
pub h: u16,
pub data: Vec<u8>,
}Expand description
Rect to be used when trying to send image to lcd screen
Fields§
§w: u16Width of the image
h: u16Height of the image
data: Vec<u8>Data of the image row by row as RGB
Implementations§
source§impl ImageRect
impl ImageRect
sourcepub fn from_image(image: DynamicImage) -> Result<ImageRect, StreamDeckError>
pub fn from_image(image: DynamicImage) -> Result<ImageRect, StreamDeckError>
Converts image to image rect
sourcepub async fn from_image_async(
image: DynamicImage
) -> Result<ImageRect, StreamDeckError>
Available on crate feature async only.
pub async fn from_image_async( image: DynamicImage ) -> Result<ImageRect, StreamDeckError>
async only.Converts image to image rect, using async