home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Get The Size Of An Image In Rust

April 2023
Code
use imagesize::size;

fn main() {
    let img = size("image_test/tmp.png").unwrap();
    dbg!(img.width);
    dbg!(img.height);

}

use: crate add imagesize to get the crate installed.

═══ § ═══