imagesize
Quickly probe the size of various image formats without reading the entire file.
Usage
Add the following to your Cargo.toml:
[]
= "0.5"
And import it using extern crate
:
extern crate imagesize;
Supported Image Formats
- BMP
- GIF
- JPEG
- PNG
- WEBP
Examples
From a file
let = match size
From a vector
Where magic_partial_download
is a function that downloads a specified amount of bytes from a given url.
let data: = magic_partial_download;
let = match blob_size