image-data 0.2.0

Process image band values as data, for use in procedural generation projects
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use imgdata::{ColorEntry, ColorFile};

fn main() -> std::io::Result<()> {
    let e1 = ColorEntry {
        name: String::from("thing1"),
        color: String::from("#123abc"),
    };
    let e2 = ColorEntry {
        name: String::from("thing2"),
        color: String::from("#abc123"),
    };
    let cf = ColorFile {
        entries: vec![e1, e2],
    };
    cf.write("examples/example-color-file.ron")?;
    Ok(())
}