On Sat, Jul 28, 2012 at 8:47 AM, Stefan Stavrev <[email protected]> wrote: > I don't know how HDR images are handled. Let's say > an HDR image has range 0-4, is that mapped to 0-1 > internally?
Floating point images are not rescaled automatically, so they potentially have values outside the 0-1 range, but that's ok. If you're using the image iterators with integer channels, all the conversion (and associated range clamping) is handled automatically. (If you want to see how it works, check out DataArrayProxy, DataProxy, and convert_type in fmath.h, along with the implementation of ImageBuf::Iterator.) > I ask because I am not sure if our brightness function > should also take min and max parameters, to clamp > if adding goes above max or below min(if we add negative value). I don't think you need to worry about going above a maximum because clamping to a sensible range will be handled by the iterators where necessary. Going below zero for float types would be a bit strange though... it's probably reasonable to clamp to zero to prevent that. ~Chris _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
