You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Took a lot more than 2 lines of code to fix this, I had an issue with unicode text not being saved in Tif files, so to fix this I changed any µ to u, but then just removed any unicode characters not present in ascii from the metadata. This still does not always work so requires further investigation.
@gabriel-ing Looks like tifffile encodes the metadata to ascii before saving (see tifffile.py). If you are seeing unicode text in your metadata after reading the data in, sounds like you need to decode it first. In the first instance as a safety net before saving, you could decode and then encode to ascii, prior to tifffile.imsave().
At the moment only saving pixelsize and unit but it should be super simple to do (I actually have done this in 2 lines of code but not tested yet)
The text was updated successfully, but these errors were encountered: