diff --git a/Tests/images/uint16_1_4660.tif b/Tests/images/uint16_1_4660.tif new file mode 100644 index 000000000..86360be8d Binary files /dev/null and b/Tests/images/uint16_1_4660.tif differ diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 22915a735..6898b22aa 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -463,6 +463,13 @@ class TestFileTiff(PillowTestCase): im2 = hopper() self.assert_image_similar(im, im2, 5) + def test_open_tiff_uint16(self): + # Test an image of all '0' values + pixel_value = 0x1234 + infile = "Tests/images/uint16_1_{}.tif".format(pixel_value) + im = Image.open(infile) + self.assertEqual(im.getpixel((0, 0)), pixel_value) + if __name__ == '__main__': unittest.main() diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index 806752dc6..ff5567701 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -110,6 +110,21 @@ class TestNumpy(PillowTestCase): self._test_img_equals_nparray(img, np_img) self.assertEqual(np_img.dtype, numpy.dtype('