Skip to content

Commit

Permalink
Use non-deprecated resampling constants
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiamarcolini committed May 26, 2022
1 parent 7179672 commit ff6b313
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions histolab/slide.py
Expand Up @@ -51,8 +51,8 @@
LARGEIMAGE_IS_INSTALLED = False

IMG_EXT = "png"
IMG_UPSAMPLE_MODE = PIL.Image.BICUBIC
IMG_DOWNSAMPLE_MODE = PIL.Image.LANCZOS
IMG_UPSAMPLE_MODE = PIL.Image.Resampling.BICUBIC
IMG_DOWNSAMPLE_MODE = PIL.Image.Resampling.LANCZOS
TILE_SIZE_PIXEL_TOLERANCE = 5


Expand Down Expand Up @@ -390,7 +390,7 @@ def locate_mask(
img = self.scaled_image(scale_factor)
mask = binary_mask(self)
resized_mask = np.array(
PIL.Image.fromarray(mask).resize(img.size, PIL.Image.ANTIALIAS)
PIL.Image.fromarray(mask).resize(img.size, PIL.Image.Resampling.LANCZOS)
)

if tissue_mask:
Expand Down

0 comments on commit ff6b313

Please sign in to comment.