@requires_img_lib()
def test_read_write_image():
 fname = op.join(temp_dir, 'out.png')
 im1 = load_crate()
 imsave(fname, im1, format='png')
 with warnings.catch_warnings(record=True):
  im2 = imread(fname)
 assert_allclose(im1, im2)

@ requires_img_lib ( ) def test_read_write_image ( ) : fname = op . join ( temp_dir , 'out.png' ) im1 = load_crate ( ) imsave ( fname , im1 , format = 'png' ) with warnings . catch_warnings ( record = True ) : im2 = imread ( fname ) assert_allclose ( im1 , im2 )
test reading and writing of images .