Aghh, yes, thanks, just dopiness on my part. More coffee needed.
Bill
> Bill Janssen wrote:
>
> >
> > I keep getting different values for "s.median" than I get for "h.index(v)".
> >
> > Shouldn't they be the same value? Am I missing something?
>
> Isn't it *mode* that you are calculating, n
[EMAIL PROTECTED] wrote:
> Is there a way how to find out a complementary colour for an area
> where I will write the text, so that the text will be seen clearly?
As Amos Newcombe pointed out, this is not what you really want. If
you still want to try, something like this would be easiest:
# co
Bill Janssen wrote:
>
> I keep getting different values for "s.median" than I get for "h.index(v)".
>
> Shouldn't they be the same value? Am I missing something?
Isn't it *mode* that you are calculating, not median? The median would
be calculated by adding up the histogram values until you ha
> I keep getting different values for "s.median" than I get for "h.index(v)".
>
> Shouldn't they be the same value? Am I missing something?
I guess they theoretically could be different, but in the photo I'm
looking at, there are no repeated values in the histogram, so that
possibility doesn't o
I'm running the following program over a photo:
#!/usr/bin/env python
import sys, os, Image, ImageStat
im = Image.open(sys.argv[1])
im = im.convert("L")
h = im.histogram()
for i in range(len(h)):
print i, h[i]
s = ImageStat.Stat(h)
print s.mean, s.stddev, s.extrema, s.median
v = max(h)
l = l
On Thu, 26 Apr 2007, Amos Newcombe wrote:
> You find the complementary color by subtracting each color band from 255
> (assuming 8-bit color). The problem with this is that if your original color
> is medium gray, the complementary color will be very close to it and you
> will get no legibility. S
You find the complementary color by subtracting each color band from 255
(assuming 8-bit color). The problem with this is that if your original color
is medium gray, the complementary color will be very close to it and you
will get no legibility. So you have to test for this case and go to some
ot
Christopher ,
Thank you for your reply.
Is there a way how to find out a complementary colour for an area where I will write the text,
so that the text will beĀ seen clearly?Is there a routine in PIL or in Python somewhere?
Thank you for help
Lad.
> [EMAIL PROTECTED] wrote:
>
> > Is
Christopher ,
Thank you for your reply.
Is there a way how to find out a complementary colour for an area where I will
write the text, so
that the text will be seen clearly?Is there a routine in PIL or in Python
somewhere?
Thank you for help
Lad.
>
> [EMAIL PROTECTED] wrote:
>
> > Is