Skip to content

Commit

Permalink
Merge pull request #838 from girder/improve-vips-format-handling
Browse files Browse the repository at this point in the history
Improve handling for vips format.
  • Loading branch information
manthey authored Apr 27, 2022
2 parents 478050c + ea1e965 commit 9aa924e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sources/vips/large_image_source_vips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ def _outputToImage(self):
xres=1.0 / (self.mm_x if self.mm_x else self._mm_y),
yres=1.0 / (self.mm_y if self.mm_y else self._mm_x))
format = self._getVipsFormat()
if img.format != format:
img = img.cast(format)
baseimg = img.copy(interpretation=self._output['interp'], format=format)

leaves = math.ceil(len(self._output['images']) ** (1. / 3))
Expand Down

0 comments on commit 9aa924e

Please sign in to comment.