Add test using big-endian uint16 image.

This commit is contained in:
Tony S Yu
2011-12-14 21:21:00 -05:00
parent abcbe673a9
commit 94c89d9020
2 changed files with 7 additions and 0 deletions
Binary file not shown.
+7
View File
@@ -58,6 +58,13 @@ def test_imread_uint16():
assert img.dtype == np.uint16
assert_array_almost_equal(img, expected)
@skipif(not PIL_available)
def test_imread_uint16_big_endian():
expected = np.load(os.path.join(data_dir, 'chessboard_GRAY_U8.npy'))
img = imread(os.path.join(data_dir, 'chessboard_GRAY_U16B.tif'))
assert img.dtype == np.dtype('>u2')
assert_array_almost_equal(img, expected)
class TestSave:
def roundtrip(self, dtype, x, scaling=1):