1 Attachment(s)
Overlay Fastloop trouble, recolouring pixels bug?
I have some trouble with Overlay and Fastloop in MMF 2 Dev.
I try to load a picture, define the background colour by the first upper left pixel and paint everything black that has not this colour.
The code itself works. Problem is that it looses some pixels while the loop which are definitely not background colour. Which makes it somehow useless ...
Some ideas what´s going on here?
The attached file contains the problemfile. Made with MMF 2 dev, needs the Overlay Extension for MMF 2.
Overlay Fastloop trouble, recolouring pixels bug?
I have some trouble with Overlay and Fastloop in MMF 2 Dev.
I try to load a picture, define the background colour by the first upper left pixel and paint everything black that has not this colour.
The code itself works. Problem is that it looses some pixels while the loop which are definitely not background colour. Which makes it somehow useless ...
Some ideas what´s going on here?
The attached file contains the problemfile. Made with MMF 2 dev, needs the Overlay Extension for MMF 2.
Re: Overlay Fastloop trouble, recolouring pixels bug?
The problem is the way you put the condition on line 16. You set it to happen when the reds are different, the greens are different, and blues are different. However, think about what happens if one color component is the same. E.g.:
RGB(52,64,25)
Would evaluate false when compared to:
RGB(52,21,92)
Because not all of the components are different.
I think what you want is three separate events, one for each color component difference.
Re: Overlay Fastloop trouble, recolouring pixels bug?
The problem is the way you put the condition on line 16. You set it to happen when the reds are different, the greens are different, and blues are different. However, think about what happens if one color component is the same. E.g.:
RGB(52,64,25)
Would evaluate false when compared to:
RGB(52,21,92)
Because not all of the components are different.
I think what you want is three separate events, one for each color component difference.
Re: Overlay Fastloop trouble, recolouring pixels bug?
Ah, stupid me. You are right. I need three separate loops here. Thank you very much for the solution. That should do the trick <img src="/center/images/graemlins/smile.gif" alt="" />
Re: Overlay Fastloop trouble, recolouring pixels bug?
Ah, stupid me. You are right. I need three separate loops here. Thank you very much for the solution. That should do the trick <img src="/center/images/graemlins/smile.gif" alt="" />
Re: Overlay Fastloop trouble, recolouring pixels bug?
No problem! <img src="/center/images/graemlins/laugh.gif" alt="" />
Re: Overlay Fastloop trouble, recolouring pixels bug?
No problem! <img src="/center/images/graemlins/laugh.gif" alt="" />