Open psobolewskiPhD opened 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.44%. Comparing base (
f66fce6
) to head (5b1efc2
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Did you validate all extensions?
Based on documentation, the .lsm
should also be able to save float.
References and relevant issues
Closes: https://github.com/napari/napari/issues/6670
Description
Only a subset of file types (e.g. TIFF) support float data, so if the user passes a different extension and dtype is float, then don't try saving to invalid format and instead warn the user. Also added a test for this condition. Also if no extension is provided and image is 3d or float, then use .tiff instead of png.
While there are skimage and imageio functions to convert arrays to int, they make assumptions, so I think this is the best way to handle this, rather than magic'ing a conversion.