https://github.com/patte/cccb-display
https://github.com/patte/cccb-display
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/patte/cccb-display
- Owner: patte
- Created: 2024-07-04T19:44:16.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-11T20:08:49.000Z (10 months ago)
- Last Synced: 2025-02-18T03:12:13.371Z (3 months ago)
- Language: Rust
- Size: 2.68 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CCCB Display
Library to show images on the "Service-Point" display at Chaos Computer Club Berlin.

## Run
1. ENVs
```bash
cp .env.example .env
```
Adapt `CCCB_IP` to the ip of the screen1. Run
```bash
cargo run --release --example simple
cargo run --release --example loop
```## Example code
```rust
use cccb_display::{CccbDisplayImagePackage, CccbImageSender};
use image::io::Reader as ImageReader;fn main() {
let img = ImageReader::open("assets/ccc.png")
.unwrap()
.decode()
.unwrap();// create package
let img_packed = CccbDisplayImagePackage::new(img.clone(), |pix| pix[3] != 0, true);// save screenshot
img_packed
.to_luma8()
.save("./screenshots/simple-screenshot.png")
.unwrap();let mut sender = CccbImageSender::new_from_env();
sender.send_package(&img_packed);
}
```