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
- jp2
- jpeg (jpg)
- jpx
- ktx
- png
- psd
- pnm
- pbm/ascii
- pgm/ascii
- ppm/ascii
- pbm/binary
- pgm/binary
- ppm/binary
- pam
- pfm
- 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 : )