Skip to content

Commit

Permalink
Use np.array to copy after PIL.Image resize
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jun 17, 2020
1 parent 4d35807 commit 45f8f3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgviz/resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _resize_pillow(src, height, width, interpolation):
if np.issubdtype(src.dtype, np.integer):
dst = PIL.Image.fromarray(src)
dst = dst.resize((width, height), resample=interpolation)
dst = np.asarray(dst)
dst = np.array(dst)
else:
assert np.issubdtype(src.dtype, np.floating)
ndim = src.ndim
Expand Down

0 comments on commit 45f8f3d

Please sign in to comment.