diff options
author | cc <cc@localhost> | 2025-08-20 17:28:35 -0700 |
---|---|---|
committer | cc <cc@localhost> | 2025-08-20 17:28:42 -0700 |
commit | b248c22d0d69643f33f779c65882f1158ed8f959 (patch) | |
tree | 976d6c2c2c4c735a1ae7380fbf93360b53071077 /src/tiff.rs | |
parent | e38b77ca4a0bef6e5ae0a28d445929e9af2ddd05 (diff) |
Data Strip Information
Diffstat (limited to 'src/tiff.rs')
-rw-r--r-- | src/tiff.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tiff.rs b/src/tiff.rs index 7143664..04eaf02 100644 --- a/src/tiff.rs +++ b/src/tiff.rs @@ -22,6 +22,8 @@ unsafe extern "C" { fn TIFFOpen(filename: *const c_char, mode: *const c_char) -> *mut TIFF; fn TIFFClose(tiff_ptr: *mut TIFF); fn TIFFGetField(tiff_ptr: *mut TIFF, tag: u32, ...) -> i32; + fn TIFFStripSize(tiff_ptr: *mut TIFF) -> i64; + fn TIFFNumberOfStrips(tiff_ptr: *mut TIFF) -> i64; } /// From tiff.h @@ -72,3 +74,15 @@ pub fn get_height(tiff_ptr: *mut TIFF) -> u32 { } return height; } + +pub fn get_strip_size(tiff_ptr: *mut TIFF) -> i64 { + unsafe { + TIFFStripSize(tiff_ptr) + } +} + +pub fn get_strip_count(tiff_ptr: *mut TIFF) -> i64 { + unsafe { + TIFFNumberOfStrips(tiff_ptr) + } +} |