https://github.com/moisutsu/imboard
This crate makes it convenient to exchange images with the clipboard
https://github.com/moisutsu/imboard
clipboard rust
Last synced: 8 days ago
JSON representation
This crate makes it convenient to exchange images with the clipboard
- Host: GitHub
- URL: https://github.com/moisutsu/imboard
- Owner: moisutsu
- License: mit
- Created: 2020-08-08T13:38:43.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-22T05:31:46.000Z (over 3 years ago)
- Last Synced: 2025-06-09T12:34:53.445Z (about 1 month ago)
- Topics: clipboard, rust
- Language: Rust
- Homepage: https://crates.io/crates/imboard
- Size: 71.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Imboard
[](https://crates.io/crates/imboard)
[](https://docs.rs/imboard)
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`
```rust
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
```rust
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(())
}
```