Peter Finlayson wrote:
I expected the default threshold (0,0,0) of this function to have it
match only that the exact color specified (ie within 0 values of the
color). However, it seems that it instead matches NO pixels.
The third comment about that function here seems to explain
what's
On 14/05/2012 10:24, Greg Ewing wrote:
The third comment about that function here seems to explain
what's happening:
The third comment is incorrect, the topmost closer to what I have found by
testing.
The function (as I expected, and as testing shows) works kind of like the magic wand in
else if ((absthe_color rmask) rshift) rloss) - r) tr)
(absthe_color gmask) gshift) gloss)
- g) tg)
(absthe_color bmask) bshift) bloss)
- b) tb)) {
/* this pixel is within the threshold of the color. */
On Mon, May 14, 2012 at 8:24 PM, Greg Ewing greg.ew...@canterbury.ac.nzwrote:
Peter Finlayson wrote:
Regardless, since there is code out in the wild that probably depends on
this behaviour it is probably best to just note the quirk in the
documentation.
There's still a problem at the
Hi,
I am using pygame.mask.from_surface(Surface, color, threshold = (0,0,0,255)) to
convert a surface into a 2D binary mask.
I expected the default threshold (0,0,0) of this function to have it match only that the exact color specified (ie
within 0 values of the color). However, it seems that