From e38b77ca4a0bef6e5ae0a28d445929e9af2ddd05 Mon Sep 17 00:00:00 2001 From: cc Date: Wed, 20 Aug 2025 17:19:05 -0700 Subject: Width and Height Bindings --- src/lib.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 4e630d5..9b726c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,4 +24,30 @@ mod tests { assert!(false); } } + + #[test] + fn tiff_height_test() { + tiff::ignore_warnings(); + if let Some(t_handle) = tiff::open("../test.tif") { + let height = tiff::get_height(t_handle); + assert!(height > 0); + println!("{:?}", height); + tiff::close(t_handle); + } else { + assert!(false); + } + } + + #[test] + fn tiff_width_test() { + tiff::ignore_warnings(); + if let Some(t_handle) = tiff::open("../test.tif") { + let width = tiff::get_width(t_handle); + assert!(width > 0); + println!("{:?}", width); + tiff::close(t_handle); + } else { + assert!(false); + } + } } -- cgit v1.2.1