Pomax / RGBAnalyse

An RGB-HC histogram library for same-origin images
16 stars 4 forks source link

Add an isGrayscale property to indicate whether the image is grayscale #6

Open rayshan opened 9 years ago

rayshan commented 9 years ago

Hello. Looks like we can tell whether an image is grayscale by whether analysis.average.H or analysis.maxima.h is 0. It'll be nice to have a boolean for convenience.

Pomax commented 9 years ago

Hm, given that if(!analysis.maxima.h) {...} works fine, I don't really need a separate grayscale flag enough to justify putting it in. If you do, though, I'll happily merge any PR you want to send over for that.

rayshan commented 9 years ago

Sure will do. I'm not familiar w/ image analysis data. All I needed was to check for grayscale. I had to go through all the returned data and compare different images to see that this value works for me. It may be nice for noobs like me.