I have been reading a lot on blend modes the last few days and here is my progress:
1. I have confirmed the math for around 20 most used blend modes, from at least 4 sources for each blend mode. The math is in different form in some sources so I had to confirm it multiple times for each mode. 2. I have a basic working implementation of the two most basic modes normal and multiply. I tested my results against the results from Photoshop, exactly the same. I will now slowly progress and add one blend mode at a time. After I am done with blending then I will work on the Porter-Duff operations. I am sending the code for you to see where I am going with this. I can handle the math and testing, but I will need advices for the general design. Even like this, it is a very compact solution, very easy to extend and maintain. But let me know if it can be improved more in terms of design, I know there are many details I will need to handle like input validation, provide appropriate documentation, etc. https://github.com/StefanStavrev/oiio/commit/42d3c13b84ab277c067c80c27666537d388bdce9 Stefan
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
