10 releases

0.2.6 Aug 27, 2020
0.2.5 Aug 23, 2020
0.1.2 Aug 9, 2020

#23 in #anyhow

44 downloads per month
Used in touka

MIT license

23KB
67 lines

Imboard

Crates.io Documentation License

This is a crate that allows you to easily exchange images with the clipboard.

Currently, only macOS is supported.

Example

Save a clipboard image to a file as clipboard.png

use anyhow::Result;

#[tokio::main]
async fn main() -> Result<()> {
    let img = imboard::copy_image::from_clipboard().await?;
    img.to_rgba().save("clipboard.png").unwrap();
    Ok(())
}

Copy a file image to the clipboard

use anyhow::Result;

#[tokio::main]
async fn main() -> Result<()> {
    let img = image::open("examples/images/copy.png")?;
    imboard::copy_image::to_clipboard(img).await?;
    Ok(())
}

Dependencies

~9–18MB
~210K SLoC