Skip to content

Commit

Permalink
Fix scaling small images in the multi source
Browse files Browse the repository at this point in the history
PR #1627 fixed one problem and introduced another.  This fixes it.
  • Loading branch information
manthey committed Sep 10, 2024
1 parent 04530e3 commit 506f42a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 1.29.9

- Fix scaling small images in the multi source ([#1633](../../pull/1633))

## 1.29.8

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion sources/multi/large_image_source_multi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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[0]) for c in destcorners), srcImage.shape[1]),
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]),
]
if max(0, -x) or max(0, -y):
transform[0][2] -= max(0, -x)
Expand Down

0 comments on commit 506f42a

Please sign in to comment.