Is that really necessary?  The way the doc you sent describes things, the blend 
modes were always used with "over".  Do PhotoShop and others give independent 
control of blend and composite?  Does anybody really need to do "screen + in"?

I was thinking that you'd want two separate functions:

1. composite() - implements any Porter-Duff operation as described in PD (12 
possibilities -- note that they can be implemented in one function with a table 
of weights, as shown in [Porter,Duff 1984, 3rd page].

2. blend() - implements any of the 20 Photoshop blend modes (assuming 'over').  
You can have one driving function that has a table of pointers to the 20 tiny 
"kernels" that operate directly on one iterators for one pixel.


On Jul 13, 2012, at 2:50 AM, Stefan Stavrev wrote:

> On second look I think the simplification Larry suggested won't work.
> 
> There are X number of Porter-Duff operations and Y number of blend
> modes. If I am doing such simplifications, I will have to do it for
> each pair (Porter-Duff operation, blend mode), and that would be 
> X = 12, Y = 20, X*Y=240 functions.
> 
> A Porter-Duff operation/function will take
> a function pointer to a blend mode function. That way I
> will get the combination like in the formula we talked about.
> But I am afraid, without much math simplification.
> 
> 
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to