0

I have a file full of .JPEG images in my system. I want to remove grayscale images from it. The main question is that how we can recognize grayscale from RGB images and then remove grayscale images fast?

altina9619
  • 31
  • 5
  • RGB has 3 channels and grayscale has 1 channel. – yudhiesh Mar 16 '21 at 15:08
  • 2
    Does this answer your question? [How to check whether a jpeg image is color or gray scale using only Python stdlib](https://stackoverflow.com/questions/23660929/how-to-check-whether-a-jpeg-image-is-color-or-gray-scale-using-only-python-stdli) –  Mar 16 '21 at 15:11
  • thanks for your reply. this is clear that RGB has 3 channel but grayscale has 1 channel. I want to know how should i check the number of channels in python? the answer of that link check the image pixel by pixel. i want to know is there any easier and faster way to detect? because my file contain about 10000 images – altina9619 Mar 17 '21 at 05:41

0 Answers0