mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-12 12:50:49 +08:00
freeimage: Correctly handle saving uint16 images (closes gh-1101)
This commit is contained in:
@@ -81,15 +81,15 @@ class TestSave:
|
||||
f.close()
|
||||
sio.imsave(fname, x)
|
||||
y = sio.imread(fname)
|
||||
assert_array_equal(x, y)
|
||||
assert_array_equal(y, x)
|
||||
|
||||
@skipif(not FI_available)
|
||||
def test_imsave_roundtrip(self):
|
||||
for shape, dtype, format in [
|
||||
[(10, 10), (np.uint8, np.uint16), ('tif', 'png')],
|
||||
[(10, 10), (np.float32,), ('tif',)],
|
||||
[(10, 10, 3), (np.uint8,), ('png',)],
|
||||
[(10, 10, 4), (np.uint8,), ('png',)]
|
||||
[(10, 10, 3), (np.uint8, np.uint16), ('png',)],
|
||||
[(10, 10, 4), (np.uint8, np.uint16), ('png',)]
|
||||
]:
|
||||
tests = [(d, f) for d in dtype for f in format]
|
||||
for d, f in tests:
|
||||
|
||||
Reference in New Issue
Block a user