Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigTiff/Exif #1

Open
jayvdb opened this issue Nov 29, 2024 · 2 comments
Open

BigTiff/Exif #1

jayvdb opened this issue Nov 29, 2024 · 2 comments

Comments

@jayvdb
Copy link

jayvdb commented Nov 29, 2024

Hi,

https://en.wikipedia.org/wiki/Gigapixel_image are becoming more common now, and BigTiff variant is a common way to store them. c.f. http://bigtiff.org/#FILE_FORMAT and https://www.loc.gov/preservation/digital/formats/fdd/fdd000328.shtml

Most tools and libraries support BigTiff transparently these days, as it is fairly easy to detect and parse.
It was added to exiftool in 2007

The "tiff" crate supports them - c.f. https://github.com/image-rs/image-tiff/blob/ff52aea/src/decoder/mod.rs#L438 for the header detection code there, which is the easy part.

The unfortunate bit is all the offsets are u64. That means either using u64 for all offsets in the crates public API, even for "small TIFFs", or using generics so the API can be strongly typed to be either u64 or u32, etc.

I am happy to have a go at adding BigTiff support, as I have been doing this for a few other TIFF/EXIF crates, however I am guessing that you have some strong opinions on which approach should be taken, and I dont have a preference.

@sophie-h
Copy link
Contributor

The gufo-exif crate is a bit messy anyways, so maybe I can just abstract it over the offset type when touching it again

@jayvdb
Copy link
Author

jayvdb commented Nov 30, 2024

I have created Roughsketch/imagesize#43 , mindeng/nom-exif#32 and kamadak/exif-rs#48 .

I am more than happy to have a crack at doing the same in gufo-exif . Could you suggest which way you would prefer to handle the u64 offsets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants