def get_resize_filter(self):
    config = self.context.config
    resample = (config.PILLOW_RESAMPLING_FILTER if (config.PILLOW_RESAMPLING_FILTER is not None) else 'LANCZOS')
    available = {'LANCZOS': Image.LANCZOS, 'NEAREST': Image.NEAREST, 'BILINEAR': Image.BILINEAR, 'BICUBIC': Image.BICUBIC, 'HAMMING': Image.HAMMING}
    return available.get(resample.upper(), Image.LANCZOS)
def get_resize_filter(self):
    config = self.context.config
    resample = (config.PILLOW_RESAMPLING_FILTER if (config.PILLOW_RESAMPLING_FILTER is not None) else 'LANCZOS')
    available = {'LANCZOS': Image.LANCZOS, 'NEAREST': Image.NEAREST, 'BILINEAR': Image.BILINEAR, 'BICUBIC': Image.BICUBIC, 'HAMMING': Image.HAMMING}
    return available.get(resample.upper(), Image.LANCZOS)