image_info
A library to extract base information of the image file:
- file size;
- MIME type;
- dimensions.
To get MIME type uses infer crate. If the file does not have a valid image MIME type, the tree_magic_mini crate is used
by fallback to get the real MIME type as infer returns an error if the MIME is not for image (e.g. "plain/text").
To get dimensions uses imagesize crate.
Additional features
- Reports error codes and error messages on failure;
- Can render result as JSON string (useful for using from other languages as wrapper with binary code calling if the FFI is not an option).
Usage