diff --git a/CHANGELOG.md b/CHANGELOG.md index ae43e83e8..61497553a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - More untiled tiff files are handles by the bioformats reader (#569) - Expose a concurrent option on endpoints for converting images (#583) - Better concurrency use in image conversion (#587) -- Handle more OME tiffs (#585) +- Handle more OME tiffs (#585, #591) ### Changes - Exceptions on cached items are no longer within the KeyError context (#584) diff --git a/sources/ometiff/large_image_source_ometiff/__init__.py b/sources/ometiff/large_image_source_ometiff/__init__.py index ef6931678..4668da9bd 100644 --- a/sources/ometiff/large_image_source_ometiff/__init__.py +++ b/sources/ometiff/large_image_source_ometiff/__init__.py @@ -311,7 +311,8 @@ def getTile(self, x, y, z, pilImageAllowed=False, numpyAllowed=False, if subdir: scale = int(2 ** subdir) if (dir is None or - dir.tileWidth != self.tileWidth or dir.tileHeight != self.tileHeight or + (dir.tileWidth != self.tileWidth and dir.tileWidth != dir.imageWidth) or + (dir.tileHeight != self.tileHeight and dir.tileHeight != dir.imageHeight) or abs(dir.imageWidth * scale - self.sizeX) > scale or abs(dir.imageHeight * scale - self.sizeY) > scale): return super().getTile(