Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

@codecov
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