diff --git a/CHANGELOG.md b/CHANGELOG.md index 63a5282..76f559a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,8 @@ and this project adheres to [Semantic Versioning][]. ### Fixed -- Passing `rgb=None` to image model parser, leading to 3-4 channel images being interpreted as RGB(A) +- Passing `rgb=None` to image model parser for both visium and visiumhd, leading to 3-4 channel images being + interpreted as RGB(A) ## [0.1.4] - 2024-08-07 diff --git a/src/spatialdata_io/readers/visium_hd.py b/src/spatialdata_io/readers/visium_hd.py index 68760fd..efec22e 100644 --- a/src/spatialdata_io/readers/visium_hd.py +++ b/src/spatialdata_io/readers/visium_hd.py @@ -385,7 +385,7 @@ def _load_image( # dask_image doesn't recognize .btf automatically and imageio v3 throws error due to pixel limit -> use imageio v2 data = imread2(path, **imread_kwargs).squeeze().transpose(2, 0, 1) image = DataArray(data, dims=("c", "y", "x")) - parsed = Image2DModel.parse(image, scale_factors=scale_factors, **image_models_kwargs) + parsed = Image2DModel.parse(image, scale_factors=scale_factors, rgb=None, **image_models_kwargs) images[dataset_id + suffix] = parsed else: warnings.warn(f"File {path} does not exist, skipping it.", UserWarning, stacklevel=2)