Expand description
Get image width and height reading as few bytes as possible.
Example:
use imsz::imsz;
let fname = "testdata/image.gif";
let info = imsz(fname)?;
println!("{}: {}, {} x {}", fname, info.format, info.width, info.height);
// testdata/image.gif: GIF, 32 x 16
// alternatively if you have something implementing std::io::Read and std::io::Seek:
use imsz::imsz_from_reader;
let mut file = BufReader::new(File::open(fname)?);
let info = imsz_from_reader(&mut file)?;
Structs§
- The width, height and format of an image.
Enums§
Traits§
- Trait to provide generic imsz() function for paths, buffers, and readers.
Functions§
- Read width and height of an image.
- Read width and height of an image.
- Read width and height of an image.