Skip to content

Commit

Permalink
test for 16bit tiffs, issue python-pillow#273
Browse files Browse the repository at this point in the history
  • Loading branch information
wiredfool committed Sep 30, 2013
1 parent b1177c8 commit 660b1a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit 660b1a9

Please sign in to comment.