On Mon, 19 May 2008 10:18:00 -0400, Poppy wrote: > Thanks, since posting I figured out how to interpret the histogram > results, which seems to be the consensus in responses. I wrote a check > image program and have been periodically calling it against a folder > where I make a copy of our images used for production. My method right > now is to check what we send for errors, but is not preventive. > > Also I determined whitespace is not the only issue, any color that > dominates. I'm considering rewriting this code below to setup bins, so > if combined neighboring colors exceeds the threshold then reject the > image. I have examples where half the image appears black, but actually > varies throughout. > > Since my image is RGB I'm looping through a 768 element list.
I suggest: 1. convert to greyscale 2. posterize 3. check the max(im.histogram()) -- Ivan -- http://mail.python.org/mailman/listinfo/python-list