Skip to main content

clipboard_copy_image

Function clipboard_copy_image 

pub fn clipboard_copy_image(width: usize, height: usize, rgba: &[u8]) -> bool
Expand description

Push an RGBA8 image (width * height * 4 bytes, row-major, no padding) onto the system clipboard as image data, so it can be pasted into an image editor or chat. Returns false when the buffer size is wrong or no backend can carry an image. Used by the PDF reader to copy a selected page region.