pyufunc.is_PIL_img#
- pyufunc.is_PIL_img(img)#
Check if the input object is a PIL image.
- Parameters:
img (Any) – input object
- Returns:
True if the input object is a PIL image, otherwise False
- Return type:
Example
>>> import cv2 >>> from PIL import Image >>> from pyufunc import is_PIL_image >>> img_cv = cv2.imread('test.jpg') >>> img_pil = Image.open('test.jpg') >>> print(is_pil_image(img_cv)) False >>> print(is_pil_image(img_pil)) True