Skip to content

Commit

Permalink
Update how some associated images are read in tiff files
Browse files Browse the repository at this point in the history
Use the libtiff code path for jpeg, not the jp2k fall-back code path
  • Loading branch information
manthey committed Jan 8, 2025
1 parent 5344175 commit 1da43dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Zero empty areas in tile frames ([#1752](../../pull/1752))
- Don't include cache libraries in [common] deployments ([#1758](../../pull/1758))
- Specify empty_dir=yes when constructing vsicurl parameters ([#1760](../../pull/1760))
- Update how some associated images are read in tiff files ([#1763](../../pull/1763))

### Bug Fixes

Expand Down
3 changes: 1 addition & 2 deletions sources/tiff/large_image_source_tiff/tiff_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,7 @@ def read_image(self):
Use the underlying _tiffFile to read an image. But, if it is in a jp2k
encoding, read the raw data and convert it.
"""
if self._tiffInfo.get('compression') not in {
libtiff_ctypes.COMPRESSION_JPEG, 33003, 33004, 33005, 34712}:
if self._tiffInfo.get('compression') not in {33003, 33004, 33005, 34712}:
return self._tiffFile.read_image()
output = None
for yidx, y in enumerate(range(0, self.imageHeight, self.tileHeight)):
Expand Down

0 comments on commit 1da43dc

Please sign in to comment.