On Fri, Jul 27, 2012 at 11:01 PM, Stefan Stavrev <[email protected]> wrote: > Here is how I see this: > > 1. The 'main' function that will take float* contrast, float* pivot, > fails if both of these are not of size A.nchannels().
Unfortunately C arrays don't come with a size, so you'll just have to assume that the user has done the right thing here. > This > function passes these two arrays to contrast_impl which then > uses each contrast, pivot pair for their corresponding channel. > It is the 'main' function that will do input validation, the other 3 > functions will only 'prepare' the arguments and call the 'main' > function. Right. > This is all we are left to deal with and contrast is pretty much done. > So, let's just make a decision on this. I am fine with the above, > but will wait for your approval. I'm happy with this API, apart from not knowing whether a per-channel pivot is really necessary. How about this: would you be happy to implement it /without/ per-channel pivot for simplicity, and if somebody says they want it we can add per channel pivoting later without changing the existing API? (That is, the C++ API would have only two out of the possible four contrast() functions outlined above. The oiiotool interface would only allow pivot to be a single float value at this stage.) ~Chris _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
