[][src]Function tim2::load

pub fn load<P: AsRef<Path>>(path: P) -> Result<Image, Error>

Loads a TIM2 image file into memory.

Examples

fn main() {
    let image = tim2::load("../assets/test.tm2").unwrap();
 
    /* print the header info for each frame found */
    for (i, frame) in image.frames().iter().enumerate() {
        println!("frame[{}]: <{}  {}>", i, frame.width(), frame.height());
    }
}