11-20-2022, 01:07 AM
@bplus I'm saying there's NO reliable test once you start blending two images together!
[b]madscijr [/b]asked why his code wasn't working -- it's because he was blending colors on a black background. In his code, these two are a perfect match:
LINE (100,100)-(300,300), _RGB32(255,0,0), BF
LINE (300,100)-(500,300), _RGBA32(255,0,0,254), BF
Now, is 255 alpha and 254 alpha a color match? Obviously not!
But once they're blended onto a 255 alpha image? How different are they??
Apparently they're not different at all, according to his tests. (I'd guess full red -- 255, at 254 alpha, does some basic type math: 255 * 254/255 = 254.whatever... which then gets rounded up to the nearest whole value of 255.)
So in this case, *once the colors are blended onto a second screen*, they're no longer different. They're so close alike that when they blend, they become the same color.
Which is why I said his answer was to _DONTBLEND those colors and then compare them.
It's not that you can't use POINT to compare values. It's that you can't use *anything* to successfully compare initial values after you blend them.
Think of it as mixing black and white and making gray.
Then you mix dark midnight-gray and ivory, which makes the same gray.
Now, can you say that the first two colors are the same as the second two colors, just because the end result matches??
[b]madscijr [/b]asked why his code wasn't working -- it's because he was blending colors on a black background. In his code, these two are a perfect match:
LINE (100,100)-(300,300), _RGB32(255,0,0), BF
LINE (300,100)-(500,300), _RGBA32(255,0,0,254), BF
Now, is 255 alpha and 254 alpha a color match? Obviously not!
But once they're blended onto a 255 alpha image? How different are they??
Apparently they're not different at all, according to his tests. (I'd guess full red -- 255, at 254 alpha, does some basic type math: 255 * 254/255 = 254.whatever... which then gets rounded up to the nearest whole value of 255.)
So in this case, *once the colors are blended onto a second screen*, they're no longer different. They're so close alike that when they blend, they become the same color.
Which is why I said his answer was to _DONTBLEND those colors and then compare them.
It's not that you can't use POINT to compare values. It's that you can't use *anything* to successfully compare initial values after you blend them.
Think of it as mixing black and white and making gray.
Then you mix dark midnight-gray and ivory, which makes the same gray.
Now, can you say that the first two colors are the same as the second two colors, just because the end result matches??