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
- avif
- bmp
- cur
- dds
- gif
- hdr (pic)
- heic (heif)
- icns
- ico
- jpeg2000 code stream (j2k, j2c, jpc, jhc)
- jpeg2000 (jp2, jpx, jph)
- jpeg (jpg)
- ktx
- png
- psd
- qoi
- svg
- tga
- tiff (tif)
- webp
- more coming...
Installation
See https://crates.io/crates/imageinfo
Example
use ;
Pretty easy?
Don't be stingy with your star : )