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

Add Float64 Support #59

Merged
merged 3 commits into from
Mar 5, 2025
Merged

Add Float64 Support #59

merged 3 commits into from
Mar 5, 2025

Conversation

weigert
Copy link
Contributor

@weigert weigert commented Mar 4, 2025

This PR adds float64 support for decoding .tiff files. This is in reference to issue #58.

The changes are relatively minor. This has been tested and works. I can't attach an example file here, but the data provided here is float64 Geodatenviewer der Stadt Wien.

Additionally, since I have been testing this locally, I used npm pack to make the module available locally to me. I added .tgz files to the .gitignore, but this change is not strictly necessary.

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.51%. Comparing base (de5d521) to head (a1577d1).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   79.89%   80.51%   +0.62%     
==========================================
  Files          12       12              
  Lines         562      580      +18     
  Branches      110      113       +3     
==========================================
+ Hits          449      467      +18     
  Misses        106      106              
  Partials        7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@targos
Copy link
Member

targos commented Mar 5, 2025

Thanks! Why can't you attach an image ? Is it because of their size? We need at least one for the test cases.

@targos
Copy link
Member

targos commented Mar 5, 2025

cgohlke/tifffile#73

Maybe we can use this library to generate a test image.

@weigert
Copy link
Contributor Author

weigert commented Mar 5, 2025

Sorry, github didn't allow uploading .TIFF files but simply zipping it solves this problem. Attached is a float64 .TIFF file I used for testing.
Vienna_21_Floridsdorf_15_3.zip

@targos
Copy link
Member

targos commented Mar 5, 2025

Can you add one to the img folder and update the test to include it here?

https://github.com/erosiv/tiff/blob/2811a7bfbaf3a1334bc56f78b07d378c1da4b692/src/__tests__/decode.test.ts#L167-L175

@weigert
Copy link
Contributor Author

weigert commented Mar 5, 2025

The image and test have been added successfully.

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

Perfect!

@targos targos merged commit a164636 into image-js:main Mar 5, 2025
10 checks passed
@weigert weigert deleted the float64 branch March 5, 2025 16:06
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.

2 participants