|
|
| No such thing as a small change | |
| PerlMonks |
Re: check if image is monochromaticby cmac (Monk) |
| on Oct 31, 2010 at 03:19 UTC ( [id://868539]=note: print w/replies, xml ) | Need Help?? |
|
When many people say "black & white" they really mean "shades of gray". If that's what you mean, and your system has (or you can get) djpeg and ppmhist as suggested by JavaFan, you might then process the @out array to see if all of the color triplets have 3 values "close together" which indicates grayscale. First look at the results of piping these as he suggests "by hand" and see what the the numbers look like.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||