diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea62562b..9a9c7b559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 1.29.8 + +### Bug Fixes + +- Fix scaling small images in the multi source with bicubic smoothing ([#1627](../../pull/1627)) + ## 1.29.7 ### Improvements diff --git a/sources/multi/large_image_source_multi/__init__.py b/sources/multi/large_image_source_multi/__init__.py index 762dc7039..a400d528d 100644 --- a/sources/multi/large_image_source_multi/__init__.py +++ b/sources/multi/large_image_source_multi/__init__.py @@ -1071,7 +1071,7 @@ def _getTransformedTile(self, ts, transform, corners, scale, frame, crop=None): # we only need every 1/srcscale pixel. srcscale = int(2 ** math.log2(max(1, srcscale))) # Pad to reduce edge effects at tile boundaries - border = int(math.ceil(2 * srcscale)) + border = int(math.ceil(4 * srcscale)) region = { 'left': int(max(0, minx - border) // srcscale) * srcscale, 'top': int(max(0, miny - border) // srcscale) * srcscale, @@ -1119,8 +1119,8 @@ def _getTransformedTile(self, ts, transform, corners, scale, frame, crop=None): # Recompute where the source corners will land destcorners = (np.dot(transform, regioncorners.T).T).tolist() destShape = [ - max(max(math.ceil(c[1]) for c in destcorners), srcImage.shape[0]), max(max(math.ceil(c[0]) for c in destcorners), srcImage.shape[1]), + max(max(math.ceil(c[1]) for c in destcorners), srcImage.shape[0]), ] if max(0, -x) or max(0, -y): transform[0][2] -= max(0, -x)