From 660b1a98aa788c1ded8c30200117829882c8cddb Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 30 Sep 2013 09:54:34 -0700 Subject: [PATCH] test for 16bit tiffs, issue #273 --- Tests/test_numpy.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index b9cacf0bb..f4f88ff41 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -62,3 +62,12 @@ def test_3d_array(): assert_image(Image.fromarray(a[1, :, :]), "L", (10, 10)) assert_image(Image.fromarray(a[:, 1, :]), "L", (10, 10)) assert_image(Image.fromarray(a[:, :, 1]), "L", (10, 10)) + + +def test_16bit(): + img = Image.open('Tests/images/12bit.cropped.tif') + px = img.load() + np_img = numpy.array(img) + assert_equal(np_img.shape, (64,64)) + assert_equal(px[1,1],np_img[1,1]) +