Skip to content
New issue

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

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

Already on GitHub? # to your account

No way to pass RATIONS/SRATIONAL/IDF/IDF8 to write_tag #178

Open
mauricefisher64 opened this issue Sep 19, 2022 · 2 comments
Open

No way to pass RATIONS/SRATIONAL/IDF/IDF8 to write_tag #178

mauricefisher64 opened this issue Sep 19, 2022 · 2 comments

Comments

@mauricefisher64
Copy link

DirectoryEncoder does not expose the types listed above so there is no way to call write_tag with entries for those types.

@HeroicKatora
Copy link
Member

Oh, I see. The impls are provided for [Ifd], [Ifd8] while DirectoryEncoder::write_tag takes its argument by-value and thus has T: Sized bound that unexpectedly restricts the allowed types. A potential fix would change the method's signature to read

pub fn write_tag<T: TiffValue>(&mut self, tag: Tag, value: &T) -> TiffResult<()>

@mauricefisher64
Copy link
Author

Also those structures are not publicly exposed so you cannot even pass them.

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

No branches or pull requests

2 participants