1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use drawable::Dimensions;
mod image16bpp;
mod image1bpp;
mod image8bpp;
mod image_bmp;
pub trait Image<'a>: Dimensions {
fn new(imagedata: &'a [u8], width: u32, height: u32) -> Self;
}
pub trait ImageFile<'a>: Dimensions + Sized {
fn new(filedata: &'a [u8]) -> Result<Self, ()>;
fn width(&self) -> u32;
fn height(&self) -> u32;
}
pub use self::image16bpp::Image16BPP;
pub use self::image1bpp::Image1BPP;
pub use self::image8bpp::Image8BPP;
pub use self::image_bmp::ImageBmp;