Hi all, I post this at the gimp-dev list cause I think more people read here and this is closely related to the progression of the Gimp Application itself, even if the core of all is GEGL. Being excited about the new high-bit depth capability I wrote an exposure operation. It is somehow inspired by the equal-named photoshop operation. A short explanation for anyone not that familiar with the use of it: This operation is mainly important for manipulating hdr images, i.e. floating point images containing values > 1. Working with such images, most of the well-known operations (e.g. curves) doesn't work at all or at least don't really make sense as they are based on the assumption the image is in an absolute 0..1/black-white domain. The "exposure" operation has three components, that are applied in the following order: Exposure: a multiplier, the usual way to manipulate a hdr images' brightness. This is implemented as a relative change, i.e. in a logarithmic way (like f-stops) Offset: a constant value added, this can be used to shift the black-level Gamma: gamma-correction. In this case used to influence the mid-range values To summarize the components of the operation: out_val = in_val * (2^exposure) out_val += offset (clamp value to 0.0 because might have become negative) out_val = out_val^(1/gamma) Some more reading: http://www.earthboundlight.com/phototips/photoshop-cs2-exposure-adjustments.html http://www.francois-tarlier.com/blog/exposureoffsetgamma-photoshop-tool-to-shaders/ This is one of my first things in gegl, so some questions came up, also some issues ihmo worth a discussion: As result values are not clamped in the positive direction, some thoughts about the parameters that are worth thinking about:Next thing for me is to make the main code use vectorization. Code is here: http://pastebin.com/xYQYYXqX http://pastebin.com/Rq5HWhbF thanks for your interest Felix (aka. kjaft) |