Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: check if image is monochromatic

by cmac (Monk)
on Oct 31, 2010 at 03:19 UTC ( [id://868539]=note: print w/replies, xml ) Need Help??


in reply to check if image is monochromatic

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://868539]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2026-04-19 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.