efficient way to compare 2 images?
#53
@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??
Reply


Messages In This Thread
efficient way to compare 2 images? - by madscijr - 11-18-2022, 07:51 PM
RE: efficient way to compare 2 images? - by bplus - 11-18-2022, 08:10 PM
RE: efficient way to compare 2 images? - by Pete - 11-18-2022, 08:26 PM
RE: efficient way to compare 2 images? - by Pete - 11-18-2022, 08:55 PM
RE: efficient way to compare 2 images? - by Pete - 11-18-2022, 09:30 PM
RE: efficient way to compare 2 images? - by Pete - 11-18-2022, 09:52 PM
RE: efficient way to compare 2 images? - by Pete - 11-18-2022, 11:08 PM
RE: efficient way to compare 2 images? - by bplus - 11-18-2022, 11:40 PM
RE: efficient way to compare 2 images? - by bplus - 11-19-2022, 12:22 AM
RE: efficient way to compare 2 images? - by bplus - 11-19-2022, 01:22 AM
RE: efficient way to compare 2 images? - by bplus - 11-19-2022, 05:39 PM
RE: efficient way to compare 2 images? - by bplus - 11-19-2022, 06:28 PM
RE: efficient way to compare 2 images? - by bplus - 11-19-2022, 10:54 PM
RE: efficient way to compare 2 images? - by bplus - 11-19-2022, 11:54 PM
RE: efficient way to compare 2 images? - by bplus - 11-19-2022, 11:57 PM
RE: efficient way to compare 2 images? - by bplus - 11-20-2022, 12:02 AM
RE: efficient way to compare 2 images? - by bplus - 11-20-2022, 12:14 AM
RE: efficient way to compare 2 images? - by bplus - 11-20-2022, 12:36 AM
RE: efficient way to compare 2 images? - by SMcNeill - 11-20-2022, 01:07 AM
RE: efficient way to compare 2 images? - by bplus - 11-20-2022, 02:37 AM



Users browsing this thread: 5 Guest(s)