Get from, and send to, the screen RGBA values in bytes (8 bit unsigned integers, u8) to read or manipulate pixels.
3 examples can be found in the examples directory. Use the following command, followed by the file title, to compile and run:
powershell
cargo run --example
Example for "\examples\getpixelsbytes.rs" :
powershell
cargo run --example get_pixels_bytes
The get_bytes function will return a Vec
Example for "\examples\sendpixelbytes.rs" :
powershell
cargo run --example send_pixel_bytes
The send_bytes function will send a Vec
Example for "\examples\clonepixelson_screen.rs" :
powershell
cargo run --example clone_pixels_on_screen
The copyandpaste_pixels function will copy the pixels from a given area of the screen and pastes them into another a given area of the screen