def _is_transparent(image):
    if not isinstance(image, Image.Image):
        # Can only deal with PIL images, fall back to the assumption that that
        # it's not transparent.
        return False
    return (image.mode in ('RGBA', 'LA') or
            (image.mode == 'P' and 'transparency' in image.info))
Check to see if an image is transparent.
dataset/ETHPy150Open hcarvalhoalves/django-rest-thumbnails/restthumbnails/processors.py/_is_transparent