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

Use tiff tag types from tiff crate #11

Merged
merged 5 commits into from
May 27, 2024
Merged

Use tiff tag types from tiff crate #11

merged 5 commits into from
May 27, 2024

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented May 16, 2024

Adding the tiff crate as a dependency (per #7), and doing some slight refactoring to use the tiff:tags:Type enum instead of defining it in-house.

Note that this also adds partial support for IFD, LONG8, SLONG8 and IFD8 variant types (untested).

TODO:

  • Add tiff crate to Cargo.toml
  • Rename src/tiff.rs to src/geotiff.rs to reduce naming confusion
  • Use tiff::tags::Type enum instead of crate::lowlevel::TagType
  • Document in main README.md the transition to using the tiff crate

TIFF decoding and encoding library in pure Rust! Repo at https://github.com/image-rs/image-tiff
Reduce confusion when using the `tiff` crate later.
Remove the TagType enum in src/lowlevel.rs, use tiff:tags:Type instead (https://docs.rs/tiff/0.9.1/tiff/tags/enum.Type.html). Added support for IFD, LONG8, SLONG8 and IFD8 types.
@weiji14 weiji14 added this to the v0.1.0 milestone May 16, 2024
@weiji14 weiji14 self-assigned this May 16, 2024
Comment on lines +144 to +147
Type::IFD => unimplemented!(),
Type::LONG8 => unimplemented!(),
Type::SLONG8 => unimplemented!(),
Type::IFD8 => unimplemented!(),
Copy link
Member Author

@weiji14 weiji14 May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO implement TagValue enum variants for these, probably in a separate PR, as will likely need some upstream changes in the tiff crate.

Also bumped up version in badge from v0.0.1 to v0.0.2 to match that in crates.io.
@weiji14 weiji14 marked this pull request as ready for review May 27, 2024 22:56
@weiji14 weiji14 merged commit f94ea53 into main May 27, 2024
1 check passed
@weiji14 weiji14 deleted the use-upstream-tiff-tags branch May 27, 2024 22:57
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

Successfully merging this pull request may close these issues.

1 participant