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

TIFF: Support SAMPLEFORMAT_COMPLEXINT (5) #884

Closed
vprivat-ads opened this issue Dec 27, 2023 · 3 comments · Fixed by #1026
Closed

TIFF: Support SAMPLEFORMAT_COMPLEXINT (5) #884

vprivat-ads opened this issue Dec 27, 2023 · 3 comments · Fixed by #1026

Comments

@vprivat-ads
Copy link

Is your feature request related to a use case or a problem you are working on? Please describe.

I cannot open some TIFF files from Capella Space Open Data, and face this error:

javax.imageio.IIOException: Unknown TIFF SampleFormat (expected 1, 2, 3 or 4): 5

Describe the solution you'd like

According to the TIFF spec, there are 6 SampleFormat values (1 to 6), but only 4 are currently supported (1 to 4).
It would be great to support the two missing values, or at least the first one:

SAMPLEFORMAT_COMPLEXINT = 5;
SAMPLEFORMAT_COMPLEXIEEEFP = 6;

Describe alternatives you've considered
N/A

Additional context

@haraldk
Copy link
Owner

haraldk commented Jan 1, 2024

Hi @vprivat-ads, Happy new year! 🎉

I agree that it would be great to add support for these sample formats, and I will for sure accept a PR adding handling for such formats. However, the TIFF spec does not define these sample formats, and according to the AwareSystems page you linked, they seem to be added by LibTIFF. I cannot find the specifications for these complex types anywhere. Of course, it might me possible to figure it out looking at the LibTIFF source code, but I would prefer a specification.

@haraldk
Copy link
Owner

haraldk commented Jan 2, 2024

Looking at the LibTiff source, I cannot find much special handling of the "complex" types... Maybe we can just treat them as normal integer or floating point?

I'm not familiar with the data, so I don't know how it's interpreted or how you process them, you probably have a better understanding of this. 😀

@vprivat-ads
Copy link
Author

Hi @haraldk! I have no idea either and will look further into it. If I can submit a PR I will let you know very soon.

toolforge-push pushed a commit to toolforge/tool-spacemedia that referenced this issue May 11, 2024
toolforge-push pushed a commit to toolforge/tool-spacemedia that referenced this issue May 11, 2024
toolforge-push pushed a commit to toolforge/tool-spacemedia that referenced this issue May 11, 2024
toolforge-push pushed a commit to toolforge/tool-spacemedia that referenced this issue May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants