arboard 3.6.1

Image and text handling for the OS clipboard.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use arboard::{Clipboard, ImageData};

fn main() {
	let mut ctx = Clipboard::new().unwrap();

	#[rustfmt::skip]
	let bytes = [
		255, 100, 100, 255,
		100, 255, 100, 100,
		100, 100, 255, 100,
		0, 0, 0, 255,
	];
	let img_data = ImageData { width: 2, height: 2, bytes: bytes.as_ref().into() };
	ctx.set_image(img_data).unwrap();
}