Here is what we have so far for Over: https://github.com/StefanStavrev/oiio/commit/a537dc58d9707ef7f6e905b9bdccc37c1c7151c6
The main code is in imagebufalgo.cpp, everything else is secondary. Please ignore any minor mistakes, after I committed I saw some. I tested the code once just to see it work http://postimage.org/image/wd7tyq25x/. In that image we have the text over the image. Almost everything we talked about so far is there, need to reread the last few messages though. I will reread the mail list again and make sure I got it all. Of course we are not over yet, we can modify this code and add new stuff as we go. I will start testing tomorrow, will try to test all possible cases. Short descriptions of the code, to make it easier for you: imagebuf.h: Added a ROI class which is very simple and two iterators for iterating over a region specified by ROI. imagebufalgo.h: added just a simple method declaration. imageio.h: added one constructor for ImageSpec. formatspec.cpp: implemented the constructor for ImageSpec declared in imageio.h. imagebuf.cpp: implemented two ROI constructors. oiiotool.cpp: just a simple wrapper to call our function. imagebufalgo.cpp: Added 5 functions. 1) parallel_image - basically the same as the old parallel_image that was in maketx/maketx.cpp. 2) ImageBufAlgo::over - It does input validation in the beginning and then it calls over_R with return type specialized. 3) over_R - calls over_RA. 4) over_RA - calls parallel_image (over_RAB, ... ). 5) Finally in over_RAB we have all types specialized and I handle all the different cases for the alpha channels and do the over operation. So basically you have this call hierarchy, it all begins with ImageBufAlgo::over: ImageBufAlgo::over -> over_R -> over_RA -> parallel_image (over_RAB, ... ). ImageBufAlgo::over is the public function, over_R and over_RA specialize types, and over_RAB contains the algorithm + some cases handling. Please do ask for more details about anything you want. Stefan
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
