TiffImages.jl
TiffImages.jl copied to clipboard
Use new sizeof metrics to improve BigTIFF vs TIFF container selection
Currently, my estimation for whether I need a BigTIFF container for a dense image or not is extremely naive:
https://github.com/tlnagy/TiffImages.jl/blob/0bb669af8c53e12fe6da92a4144b8bc955221b2c/src/types/dense.jl#L52-L58
In https://github.com/tlnagy/TiffImages.jl/commit/f2340358071a3996826a0b2983f15cc76c31de38, I implemented a concrete determination of the size of an image on disk and I should use that logic instead. This should eliminate any weird edge cases when the image is very close to the maximum size of a normal TIFF container.
For example, here's how easy it is for mmapped images:
https://github.com/tlnagy/TiffImages.jl/blob/0bb669af8c53e12fe6da92a4144b8bc955221b2c/src/types/mmap.jl#L175-L176