| Crates.io | imboard |
| lib.rs | imboard |
| version | 0.2.6 |
| created_at | 2020-08-09 15:53:25.68894+00 |
| updated_at | 2020-08-27 02:26:31.456538+00 |
| description | Exchange images with the clipboard. |
| homepage | |
| repository | https://github.com/moisutsu/imboard |
| max_upload_size | |
| id | 274685 |
| size | 39,028 |
This is a crate that allows you to easily exchange images with the clipboard.
Currently, only macOS is supported.
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(())
}