imgutils.validate.color
is_greyscale
- imgutils.validate.color.is_greyscale(image: str | PathLike | bytes | bytearray | BinaryIO | Image)[source]
Overview: Check if an image is greyscale or not.
- Parameters:
image – Path or PIL object of image.
- Returns:
Is greyscale or not.
- Examples:
Here are some images for example
>>> from imgutils.validate import is_greyscale >>> >>> is_greyscale('jpeg_full.jpeg') False >>> is_greyscale('6125901.jpg') False >>> is_greyscale('6125785.png') False >>> is_greyscale('6124220.jpg') True