mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 08:14:10 +03:00
Read all compressed files through libtiff.
This commit is contained in:
parent
bec8f415be
commit
4877552581
|
@ -1244,15 +1244,7 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
offsets = self.tag_v2[STRIPOFFSETS]
|
||||
h = self.tag_v2.get(ROWSPERSTRIP, ysize)
|
||||
w = self.size[0]
|
||||
if READ_LIBTIFF or self._compression in ["tiff_ccitt", "group3",
|
||||
"group4", "tiff_jpeg",
|
||||
"tiff_adobe_deflate",
|
||||
"tiff_thunderscan",
|
||||
"tiff_deflate",
|
||||
"tiff_sgilog",
|
||||
"tiff_sgilog24",
|
||||
"tiff_raw_16",
|
||||
"jpeg"]:
|
||||
if READ_LIBTIFF or self._compression != 'raw':
|
||||
# if DEBUG:
|
||||
# print("Activating g4 compression for whole file")
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ class TestFileTiff(PillowTestCase):
|
|||
|
||||
self.assertEqual(im.mode, "RGBA")
|
||||
self.assertEqual(im.size, (100, 40))
|
||||
self.assertEqual(im.tile, [('tiff_lzw', (0, 0, 100, 40), 50, 'RGBa;16B')])
|
||||
self.assertEqual(im.tile, [('tiff_lzw', (0, 0, 100, 40), 0, ('RGBa;16B', 'tiff_lzw', False))])
|
||||
im.load()
|
||||
|
||||
self.assert_image_equal_tofile(im, "Tests/images/tiff_16bit_RGBa_target.png")
|
||||
|
|
Loading…
Reference in New Issue
Block a user