Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a method for detecting if an image contains only black pixels. When I say method I mean an existing command line tool. I could write up something myself but I'm sure something probably exists already.

share|improve this question
Do you want to detect exact black pictures RGB(0,0,0), or also dark pictures like ones with too short exposure? – Jonas Stein Sep 13 '14 at 17:05

I bet that Imagemagick is what you want. In fact, there's an Imagemagick forum entry that probably fits your needs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.