imageinfo-rs

Rust library to get image size and format without loading/decoding.

The imageinfo don't get image format by file ext name, but infer by file header bytes and character.

A rewrite of c++ version imageinfo

Some test image files are from image-size. Many thanks to @netroy.

Supported formats

Example

toml [dependencies] imageinfo = "0.2.0"

```rust use imageinfo::{ImageInfo};

fn main() { match ImageInfo::fromfilepath("images/valid/bmp/sample.bmp") { Ok(info) => { println!(" - Ext : {}", info.ext); println!(" - Full Ext : {}", info.fullext); println!(" - Size : {}", info.size); println!(" - Mimetype : {}", info.mimetype); println!(" - Entries :"); for size in info.entrysizes.iter() { println!(" - {}", size); } } Err(err) => { println!(" - Err : {}", err); } } } ```

Pretty easy?

Don't be stingy with your star : )