diff --git a/extensions/chaeo/products.py b/extensions/chaeo/products.py index 58596492f77ef52112329613ff302e8de60e4033..e665d878208321ee78f89f5b41a5724623505c09 100644 --- a/extensions/chaeo/products.py +++ b/extensions/chaeo/products.py @@ -179,7 +179,11 @@ def export_patches_from_zstack( ext = 'tif' if make_3d else 'png' fname = f'{prefix}-la{obj.label:04d}-zi{obj.zi:04d}.{ext}' - _write_patch_to_file(where, fname, resample_to_8bit(patch)) + + if patch.dtype is np.dtype('uint16'): + _write_patch_to_file(where, fname, resample_to_8bit(patch)) + else: + _write_patch_to_file(where, fname, patch) exported.append({ 'df_index': idx,