From b2650993c57911c75560061d5ee4b91e6f1646b3 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 15 Jan 2021 11:31:08 -0500 Subject: [PATCH] For the tiff tile source, allow decoding jp2k tiles. --- CHANGELOG.md | 1 + sources/tiff/large_image_source_tiff/tiff_reader.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c526425cf..6c585f1a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Better release bioformats resources (#502) - Better handling of tiff files with JPEG compression and RGB colorspace (#503) - The openjpeg tile source can decode with parallelism (#511) +- Support decoding JP2k compressed tiles in the tiff tile source ### Bug Fixes - Harden updates of the item view after making a large image (#508) diff --git a/sources/tiff/large_image_source_tiff/tiff_reader.py b/sources/tiff/large_image_source_tiff/tiff_reader.py index f0d59e7cf..af5a49fc4 100644 --- a/sources/tiff/large_image_source_tiff/tiff_reader.py +++ b/sources/tiff/large_image_source_tiff/tiff_reader.py @@ -765,7 +765,7 @@ def getTile(self, x, y): if (not self._tiffInfo.get('istiled') or self._tiffInfo.get('compression') not in ( - libtiff_ctypes.COMPRESSION_JPEG, 33003, 33005) or + libtiff_ctypes.COMPRESSION_JPEG, 33003, 33005, 34712) or self._tiffInfo.get('bitspersample') != 8): return self._getUncompressedTile(tileNum)