RSS/Atom feed Twitter
Site is read-only, email is disabled

Clamping results to valid range

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Clamping results to valid range Nanley Chery 21 Dec 15:39
  Clamping results to valid range Øyvind Kolås 21 Dec 16:27
Nanley Chery
2014-12-21 15:39:02 UTC (over 9 years ago)

Clamping results to valid range

Why don't operations like gegl:add and gegl:multiply clamp the resulting values between 0.0 and 1.0? Won't this potentially result in garbage rgb values?

Thanks,
Nanley

Øyvind Kolås
2014-12-21 16:27:46 UTC (over 9 years ago)

Clamping results to valid range

On Sun, Dec 21, 2014 at 4:39 PM, Nanley Chery wrote:

Why don't operations like gegl:add and gegl:multiply clamp the resulting values between 0.0 and 1.0? Won't this potentially result in garbage rgb values?

The RGB values used by GEGL are not bounded by the gamut of a color space. Out of gamut values are not garbage, but can occur both as intermediate/temporary values - in operations like unsharp mask, as well as for HDR[1] and if the RGB data originates in a color space with a larger gamut than the one currently used.

If any operation, or an application like GIMP, requests the data with an 8bit or 16bit representation the data is clamped then.

1: http://en.wikipedia.org/wiki/High-dynamic-range_imaging

/pippin