On Jun 13, 2012, at 10:38 AM, Stefan Stavrev wrote: > I say let's do it "what you push is what you get". Don't assume anything. The > input images must have same number of channels and alpha channel must be > specified in same position. If the programmer, the user of OIIO, feels like > handling all these cases for his application then he can have a wrapper for > our function where he can include any tests he likes before he calls it. > > At this point I need to ask where is OIIO going, is it a library to be used > by programmers for other applications or is it becoming an application by > itself?
Both. Dozens of programmers will type "ImageBufAlgo::over (R,A,B)" while writing apps, but hundreds or thousands of people will type "oiiotool A.exr -over B.exr -o R.exr". The only two ambiguous cases we're talking about are: * 4-channel files with no identified alpha -- assume channel 3 is alpha * 3-channel files with no identified alpha -- assume alpha==1.0 I'm thinking primarily of how oiiotool will call the over() function, as a very loose wrapper driven by the command line. A different app that wanted to take a hard line about the channels is free to look at the images in question and reject the operation before ever calling over(). Maybe I'm wrong about how to handle these cases. I suppose we could be fast to reject images without a clear alpha, and return to this issue later if this turns out to be a common problem for people. Jono, do you really think it's ok to reject these cases? Jeremy, do you want to weigh in? Anybody else who has extensive experience or strong views in this area? -- Larry Gritz [email protected] _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
