Skip to content

Commit

Permalink
version agnostic resampling for PIL # 34
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrink committed Nov 4, 2022
1 parent 9dc5f7f commit e98dd87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion RanDepict/randepict.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from skimage import io as sk_io
from skimage.color import rgba2rgb, rgb2gray
from skimage.util import img_as_ubyte, img_as_float
from PIL import Image, ImageFont, ImageDraw, ImageStat, ImageEnhance
from multiprocessing import set_start_method, get_context
import imgaug.augmenters as iaa
import random
Expand Down Expand Up @@ -40,6 +39,11 @@
from scipy.ndimage import gaussian_filter
from scipy.ndimage import map_coordinates

from PIL import Image, ImageFont, ImageDraw, ImageStat, ImageEnhance

# Below version 9.0, PIL stores resampling methods differently
if not hasattr(Image, 'Resampling'):
Image.Resampling = Image
@dataclass
class RandomDepictorConfig:
"""
Expand Down

1 comment on commit e98dd87

@OBrink
Copy link
Owner Author

@OBrink OBrink commented on e98dd87 Nov 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#34

Please sign in to comment.