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

Reading (private) IFD tags #144

Open
Christopher22 opened this issue Jun 16, 2021 · 2 comments
Open

Reading (private) IFD tags #144

Christopher22 opened this issue Jun 16, 2021 · 2 comments

Comments

@Christopher22
Copy link
Contributor

Am I correct that there is currently no way to read (private) IFD Tags like "GpsIFD"? However, the necessary parsing method is already implemented and even the offset of the tag is available (tiff::decoder::ifd::Value::Ifd(offset)).

By extending read_ifd, I would offer to add the missing function pub fn get_tag_ifd(&mut self, tag: Tag) -> TiffResult<tiff::decoder::ifd::Directory>.

Are there any opinions or criticism regarding that plan?

@fintelia
Copy link
Contributor

Overall I think your plan seems reasonable. I do wonder whether the tags in a GpsIFD have the same meanings as in a normal IFD? There's also a risk that get_tag_ifd would leave the decoder in a weird state, but that shouldn't be too hard to avoid.

@Christopher22
Copy link
Contributor Author

What exactly do you mean with "same meaning"? :) As I understand the standard, all tags live in a namespace of their own and are private to the particular type. As such, I am even allowed to use i. e. tag 256 (ImageWidth) with a completely different meaning within this tag.

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