- Switch to zstd compression as default.

- Only warn if frames are missing when the file is closed, allowing the user to debug the error causing missing frames.
This commit is contained in:
Wim Pomp
2024-02-14 14:54:13 +01:00
parent e736770512
commit 43b6a48049
3 changed files with 55 additions and 41 deletions

View File

@@ -10,8 +10,8 @@ def test_mult(tmp_path):
shape = (2, 3, 5)
paths = [tmp_path / f'test{i}.tif' for i in range(6)]
with ExitStack() as stack:
tifs = [stack.enter_context(IJTiffFile(path, shape)) for path in paths]
for c, z, t in tqdm(product(range(shape[0]), range(shape[1]), range(shape[2])), total=np.prod(shape)):
tifs = [stack.enter_context(IJTiffFile(path, shape)) for path in paths] # noqa
for c, z, t in tqdm(product(range(shape[0]), range(shape[1]), range(shape[2])), total=np.prod(shape)): # noqa
for tif in tifs:
tif.save(np.random.randint(0, 255, (64, 64)), c, z, t)
assert all([path.exists() for path in paths])