mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-20 12:40:31 +08:00
Use frombytes instead of fromstring on PIL images, since the latter is now deprecated
This commit is contained in:
@@ -109,7 +109,7 @@ def imsave(fname, arr, format_str=None):
|
||||
if not isinstance(fname, string_types) and format_str is None:
|
||||
format_str = "PNG"
|
||||
|
||||
img = Image.fromstring(mode, (arr.shape[1], arr.shape[0]), arr.tostring())
|
||||
img = Image.frombytes(mode, (arr.shape[1], arr.shape[0]), arr.tostring())
|
||||
img.save(fname, format=format_str)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user