Get The Width And Height Of An Image In Rust
I'm using the image crate 1 to get the width and height of images for a project. It's a few lines of code that looks like this :
rust
use Reader;
The process is pretty slow. It can take a second or two for the values to return. Doing it with ImageMagick 2 is much faster. The raw ImageMagick command for the command line looks like this :
bash
That can be used in a Rust ` Command [TODO: Code shorthand span ] call for a faster turn around if ImageMagick is installed.
Footnotes And References
- •
The Rust > image > https : //docs.rs/image/latest/image/index.html > crate
- •
> ImageMagick > https : //imagemagick.org/ - *the* command line image swiss army knife.