Skip to content

Commit

Permalink
Merge pull request #87 from scikit-beam/revert-86-revert-85-fix_scipy…
Browse files Browse the repository at this point in the history
…_imresize

Revert "Revert "Fix deprecated scipy call in imageslider widget""
  • Loading branch information
JeanBilheux authored Aug 4, 2021
2 parents 9bdeae5 + 74b31fe commit a062c90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ipywe/imageslider.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ def getimg_bytes(self):
# resample if necessary
resample_ratio = view_size/size
if resample_ratio != 1.:
import scipy.misc
img = scipy.misc.imresize(img, resample_ratio)
from PIL import Image
img = np.array(Image.fromarray(img).resize((self.width, self.height)))
"""Allows the correct string IO module to be used
based on the version of Python.
Once support for Python 2.7 ends, this if-else statement
Expand Down

0 comments on commit a062c90

Please sign in to comment.