Crate imsz

Crate imsz 

Source
Expand description

Get image width and height reading as few bytes as possible.

GitHub โ€“ C API Reference

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)?;

Macrosยง

array2 ๐Ÿ”’
array4 ๐Ÿ”’
map_err ๐Ÿ”’
map_expr ๐Ÿ”’

Structsยง

BigEndianReader ๐Ÿ”’
ImInfo
The width, height and format of an image.
LittleEndianReader ๐Ÿ”’

Enumsยง

ImError
ImFormat

Traitsยง

BinaryReader ๐Ÿ”’
Imsz
Trait to provide generic imsz() function for paths, buffers, and readers.
Ratio ๐Ÿ”’

Functionsยง

find_riff_chunk ๐Ÿ”’
imsz
Read width and height of an image.
imsz_from_path
Read width and height of an image.
imsz_from_reader
Read width and height of an image.
is_tga ๐Ÿ”’
parse_tiff ๐Ÿ”’

Type Aliasesยง

ImResult