Merge pull request #104 from tonysyu/pil-big-endian

ENH: Add test using big-endian uint16 image.
This commit is contained in:
Stefan van der Walt
2011-12-17 00:08:26 -08:00
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):