Page 1 of 1

Find images that are not sRGB (Black/White/Colorless)

Posted: 2019-06-22T07:26:52-07:00
by PRAGMA
I have a folder of like 400k images and I need to find any image that is just black/white or just black or just white or its color profile isnt sRGB.
Currently I do this via -identify and just .contains check it, but it takes ages, it does 5k images within a couple hours, its fairly slow, surely theres a better option then that?

Re: Find images that are not sRGB (Black/White/Colorless)

Posted: 2019-06-22T08:27:07-07:00
by snibgo
I suppose you mean that you use "identify -verbose"? That does more work than you need, so you could do it more quickly.

Is your IM HDRI? If it is, and you don't have floating-point images, then you could use an integer IM for faster speeds.

If many of your image files are not sRGB or do not have three channels, you might use exiftool first to filter them out.