Re: pil, histogram, mask

2007-02-01 Thread Daniel Nogradi
> > I don't need the histogram really, only the mean color > > value, but as far as I can see the 'mean' attribute only applies to an > > image and a mask can not be specified. > > You can slice parts of the image, and then use the > ImageStat.Stat(im).mean > On it. > > Bye, > bearophile Okay, I'l

Re: pil, histogram, mask

2007-02-01 Thread bearophileHUGS
Daniel Nogradi > I don't need the histogram really, only the mean color > value, but as far as I can see the 'mean' attribute only applies to an > image and a mask can not be specified. You can slice parts of the image, and then use the ImageStat.Stat(im).mean On it. Bye, bearophile -- http://m

pil, histogram, mask

2007-01-31 Thread Daniel Nogradi
How does one do a histogram on only a part of an image? This is what I found in the PIL documentation about histogram( ): """ im.histogram(mask) => list Returns a histogram for those parts of the image where the mask image is non-zero. The mask image must have the same size as the image, and be e