def test_freeimage(): img = np.arange(256).reshape((16,16)).astype(np.uint8) freeimage.imsave(_testimgname, img) img_ = freeimage.imread(_testimgname) assert img.shape == img_.shape assert np.all(img == img_)
def test_uint16(): img = np.zeros((32,32), dtype=np.uint16) freeimage.imsave(_testimgname, img) img_ = freeimage.imread(_testimgname) assert img.shape == img_.shape assert img.dtype == img_.dtype assert np.all(img == img_)
def test_save_load_rgba(): img = np.arange(256).reshape((8,8,4)).astype(np.uint8) freeimage.imsave(_testimgname, img) img_ = freeimage.imread(_testimgname) assert img.shape == img_.shape assert np.all(img == img_)