Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up multi source compositing in tiled cases #1513

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Improvements
- Improve uint16 image scaling ([#1511](../../pull/1511))
- Read some untiled tiffs using the tiff source ([#1512](../../pull/1512))
- Speed up multi source compositing in tiled cases ([#1513](../../pull/1513))

## 1.28.1

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 @@ -1098,12 +1098,12 @@ def _addSourceToTile(self, tile, sourceEntry, corners, scale):
:returns: a numpy array of the tile.
"""
source = self._sources[sourceEntry['sourcenum']]
ts = self._openSource(source, sourceEntry['kwargs'])
# If tile is outside of bounding box, skip it
bbox = source['bbox']
if (corners[2][0] <= bbox['left'] or corners[0][0] >= bbox['right'] or
corners[2][1] <= bbox['top'] or corners[0][1] >= bbox['bottom']):
return tile
ts = self._openSource(source, sourceEntry['kwargs'])
transform = bbox.get('transform')
x = y = 0
# If there is no transform or the diagonals are positive and there is
Expand Down