Crates.io | tim2 |
lib.rs | tim2 |
version | 0.3.1 |
source | src |
created_at | 2020-04-04 08:20:42.997162 |
updated_at | 2020-04-19 20:12:23.897533 |
description | An image loader for TIM2 (.tm2) image files |
homepage | |
repository | https://www.github.com/travistrue2008/tim2-rs |
max_upload_size | |
id | 226167 |
size | 14,982 |
An image loader for TIM2 (.tm2) image files
Add the crate to your project's Cargo.toml:
[dependencies]
tim2 = "0.1.0"
Here's a basic example of loading the file:
use tim2;
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());
}
}