Am 30.11.2012 um 20:37 schrieb William Koperwhats <[email protected]>:

> So far performance hasn't been a real issue, but I'm more interested in how 
> these two functions achieve their results. 

CombineMBS with mode 8 does this:

        if (x1>x2)
                {
                return x1-x2;
                }
        else
                {
                return x2-x1;
                }

So we compare and return difference for each red, green and blue value.

DiffPicturesMBS on the other hand does make diff of picture and changes sign if 
needed.

                        int r=(r1-r2);                                  
                        int g=(g1-g2);                                  
                        int b=(b1-b2);                                  
                                                                                
        \
                        if (r<0) r = -r;                                
                        if (g<0) g = -g;                                
                        if (b<0) b = -b;                                

Not sure which one is better.

> One thing that I've noticed is that if I subtract a grey area that is 
> *brighter* than the underlying image, rather than leaving a black hole (which 
> is what I would expect), it will actually cause a bright spot, like it was 
> "wrapping around" the color space or something. Can you offer any insight on 
> why this might be?


Well, actually I could add another mode to CombineMBS where you get black if 
one image pixel value is higher than other.

Greetings
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to