After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757069 - Auto-stretch contrast should operate on linear RGB.
Auto-stretch contrast should operate on linear RGB.
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: operations
git master
Other All
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2015-10-24 17:15 UTC by Elle Stone
Modified: 2015-11-21 02:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to make auto-stretch contrast work by default on linear RGB. (1.92 KB, patch)
2015-10-24 17:15 UTC, Elle Stone
none Details | Review
Illustration showing that auto-stretch contrast should default to linear RGB. (238.86 KB, image/jpeg)
2015-10-24 17:16 UTC, Elle Stone
  Details

Description Elle Stone 2015-10-24 17:15:01 UTC
Created attachment 314030 [details] [review]
Patch to make auto-stretch contrast work by default on linear RGB.

Auto-stretch contrast is the equivalent of setting the Levels Value channel white and black points to stretch or compress the dynamic range of the image to fit within 0.0f and 1.0f. 

On the one hand, setting the white point works about the same (probably exactly the same) on perceptually uniform and linear RGB, although of course the *amount* of the required adjustment varies depending on whether the operation is done on linear or perceptually uniform RGB.

On the other hand, setting the black point on perceptually uniform RGB introduces tonality and saturation artifacts: 

   * On a low-saturation image, the differences aren't very noticeable. 

   * The higher the saturation of the original image, the more distorted are the results of operating on perceptually uniform RGB. 

   * For images with out of gamut RGB values, auto-stretch contrast performed on perceptually uniform RGB produces extreme tonality and saturation distortion.

To help users get the right results without having to change precision and use the gamma hack, the default for auto-stretch contrast should be to operate on linear RGB.
Comment 1 Elle Stone 2015-10-24 17:16:46 UTC
Created attachment 314031 [details]
Illustration showing that auto-stretch contrast should default to linear RGB.
Comment 2 Øyvind Kolås (pippin) 2015-11-21 02:41:37 UTC
commit a9f56120324585aa24ebec455fa2be5b3ba9d985
Author: Elle Stone <ellestone@ninedegreesbelow.com>
Date:   Sat Oct 24 13:02:48 2015 -0400

    Make auto-stretch contrast operate on linear RGB.