|
2 | 2 | import sys
|
3 | 3 | from io import BytesIO
|
4 | 4 |
|
5 |
| -from PIL import Image, TiffImagePlugin, features |
| 5 | +from PIL import Image, TiffImagePlugin |
6 | 6 | from PIL._util import py3
|
7 | 7 | from PIL.TiffImagePlugin import RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION
|
8 | 8 |
|
@@ -587,30 +587,6 @@ def test_close_on_load_nonexclusive(self):
|
587 | 587 | im.load()
|
588 | 588 | self.assertFalse(fp.closed)
|
589 | 589 |
|
590 |
| - @unittest.skipUnless(features.check("libtiff"), "libtiff not installed") |
591 |
| - def test_sampleformat_not_corrupted(self): |
592 |
| - # Assert that a TIFF image with SampleFormat=UINT tag is not corrupted |
593 |
| - # when saving to a new file. |
594 |
| - # Pillow 6.0 fails with "OSError: cannot identify image file". |
595 |
| - import base64 |
596 |
| - |
597 |
| - tiff = BytesIO( |
598 |
| - base64.b64decode( |
599 |
| - b"SUkqAAgAAAAPAP4ABAABAAAAAAAAAAABBAABAAAAAQAAAAEBBAABAAAAAQAA" |
600 |
| - b"AAIBAwADAAAAwgAAAAMBAwABAAAACAAAAAYBAwABAAAAAgAAABEBBAABAAAA" |
601 |
| - b"4AAAABUBAwABAAAAAwAAABYBBAABAAAAAQAAABcBBAABAAAACwAAABoBBQAB" |
602 |
| - b"AAAAyAAAABsBBQABAAAA0AAAABwBAwABAAAAAQAAACgBAwABAAAAAQAAAFMB" |
603 |
| - b"AwADAAAA2AAAAAAAAAAIAAgACAABAAAAAQAAAAEAAAABAAAAAQABAAEAAAB4" |
604 |
| - b"nGNgYAAAAAMAAQ==" |
605 |
| - ) |
606 |
| - ) |
607 |
| - out = BytesIO() |
608 |
| - with Image.open(tiff) as im: |
609 |
| - im.save(out, format="tiff") |
610 |
| - out.seek(0) |
611 |
| - with Image.open(out) as im: |
612 |
| - im.load() |
613 |
| - |
614 | 590 |
|
615 | 591 | @unittest.skipUnless(sys.platform.startswith("win32"), "Windows only")
|
616 | 592 | class TestFileTiffW32(PillowTestCase):
|
|
0 commit comments