mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-28 22:54:02 +08:00
Fix handling of temp file removal
This commit is contained in:
@@ -92,11 +92,12 @@ def roundtrip(img, plugin, suffix):
|
||||
temp_file.close()
|
||||
fname = temp_file.name
|
||||
io.imsave(fname, img, plugin=plugin)
|
||||
new = io.imread(fname, plugin=plugin)
|
||||
try:
|
||||
os.remove(fname)
|
||||
except Exception:
|
||||
pass
|
||||
return io.imread(fname, plugin=plugin)
|
||||
return new
|
||||
|
||||
|
||||
def ubyte_check(plugin, fmt='png'):
|
||||
|
||||
Reference in New Issue
Block a user