#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Header {
    pub width: u32,
    pub height: u32,
    pub channels: Channels,
    pub colorspace: Colorspace,
}


#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Colorspace {
    Srgb,
    Linear
}

#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Channels {
    RGB,
    RGBA
}


pub const MAGIC: [u8; 4] = [b'q', b'o', b'i', b'f'];

pub fn hash ([r, g, b, a]: [u8; 4]) -> usize {
     (r as usize * 3 + g as usize * 5 + b as usize * 7 + a as usize * 11) % 64
}
