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
#[cfg(feature = "bmp")]
mod image_bmp;
mod image_raw;
#[cfg(feature = "tga")]
mod image_tga;
pub use self::image_raw::{Image, ImageBE, ImageLE};
#[cfg(feature = "bmp")]
pub use self::image_bmp::ImageBmp;
#[cfg(feature = "tga")]
pub use self::image_tga::ImageTga;
pub trait ImageFile<'a>: crate::Dimensions + Sized {
fn new(filedata: &'a [u8]) -> Result<Self, ()>;
fn width(&self) -> u32;
fn height(&self) -> u32;
}