01-21-2023, 04:00 PM
(01-21-2023, 03:53 PM)TerryRitchie Wrote:(01-21-2023, 11:17 AM)TempodiBasic Wrote: @TerryRitchie
Hi
I'm very glad to say you... I have found the bug!
Yes, IMHO if you change one line of your MakeMask routine, your tool works perfectly!
the issue comes out from the setting of the background color in MakeMask routine!Code: (Select All)cc~& = Point(10, 10) '_RGB32(255, 0, 255) ' set the color to be used as transparent
We must take background/ transparent color from the image passed to the routine!
Please take a try and you enjoy to see working your tool for detection!
Thanks to Bplus for rising out this bug! We get another step toward a good tool!
Oh for goodness sake. I hard coded the transparent color for the example images instead having the routine detect the transparent color. Thanks for finding this. The code works for this example but will fail when images with differing transparent colors are used. Your catch will make this a true general use routine.
I'll work on changing the code and upload the result here.
Even with that fix there is still a false positive collision detected when the image edge contacts the other image, modified code in zip for testing above.
b = b + ...