2009/4/28 Fredrik Lundh <[email protected]>:
>    mask = ImageMath.eval(
>        "convert(((abs(r - R)*abs(g - G)*abs(b - B)) < distance3)*255, 'L')",
>        **locals())
>
>    # paste in some nice color on pixels that are "close" to the target color
>    im.paste("white", mask)
>
> (no time to do benchmarking and detailed testing, but the above should
> be fairly efficient)

Yes it's pretty quick. I didn't realise ImageMath was so fast, thank
you for the example.

John
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to