csc411_image/
imgtype.rs

1/// Public enumerator to specify the type of the Image being built
2pub enum ImageType {
3    Gray(Gray),
4    Rgb(Rgb)
5}
6
7/// A `Gray` pixel contains a single `u16` value indicating brightness
8#[derive(Clone, Debug)]
9pub struct Gray {
10    pub value: u16,
11}
12
13/// An `Rgb` pixel contains three `u16` values, for red, green, and blue channels respectively
14#[derive(Clone, Debug)]
15pub struct Rgb {
16    pub red: u16,
17    pub green: u16,
18    pub blue: u16,
19}