On Jul 20, 2012, at 8:08 AM, Stefan Stavrev wrote:
> Larry before I go too far, let me know if you like the comments
> like this:
> http://ideone.com/WaZfr
float
bm_color_burn (float a, float aa, float b, float ba)
{
if (a==0) {
if (b==ba)
return aa*(ba-b) + b;
else
return b*(1-aa);
} else {
return a*(1-ba) + b*(1-aa) + aa*ba * (1 - std::min (1.0f, (1 -
b/ba)*(aa/a)));
}
}
That doesn't quite make sense to me. If b == ba, then (ba-b) == 0 and thus it
returns only b. That doesn't seem right to me.
> That is the comment in imagebufalgo.cpp. In imagebufalgo.h
> I have the canonical formulas like this:
>
> http://ideone.com/enHbV
That looks good to me. You don't need "DLLPUBLIC" on an enum -- that is a
linkage directive to make symbols visible outside the DLL, and a plain enum is
only known to the compiler, there is no linkage issue or symbols to expose.
--
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org