A bitmap file decoder for Microsoft bmp files.
use std::fs::File;
use bmp_rs::{
Result,
Builder,
};
struct ImageBuilder {
}
struct Image {
}
impl Builder for ImageBuilder {
type TResult = Image;
fn set_size( &mut self, width: u32, height: u32 ) {
}
fn set_pixel( &mut self, x: u32, y: u32, r: u8, g: u8, b: u8, a: u8 ) {
}
fn build( &mut self ) -> Result<Self::TResult> {
Ok ( Image { } )
}
}
fn main() {
let mut file = File::open( "image.bmp" ).unwrap();
let image = bmp_rs::decode( &mut file, ImageBuilder { } );
}