diff --git a/testdata/tiff_mag_2_reference.tar.gz b/testdata/tiff_mag_2_reference.tar.gz index a0e041c9b..9df1dc11b 100644 Binary files a/testdata/tiff_mag_2_reference.tar.gz and b/testdata/tiff_mag_2_reference.tar.gz differ diff --git a/wkcuber/downsampling.py b/wkcuber/downsampling.py index 593527414..6fb57425d 100644 --- a/wkcuber/downsampling.py +++ b/wkcuber/downsampling.py @@ -169,7 +169,14 @@ def downsample( ) ) - ensure_wkw(target_wkw_info) + with open_wkw(source_wkw_info) as source_wkw: + num_channels = source_wkw.header.num_channels + header_block_type = ( + wkw.Header.BLOCK_TYPE_LZ4HC if compress else wkw.Header.BLOCK_TYPE_RAW + ) + ensure_wkw( + target_wkw_info, block_type=header_block_type, num_channels=num_channels + ) with get_executor_for_args(args) as executor: futures = []