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 735898 - Layer and paint modes depend on default layer pixel format encoding (precision)
Layer and paint modes depend on default layer pixel format encoding (precision)
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal normal
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks: 757485
 
 
Reported: 2014-09-02 14:47 UTC by Elle Stone
Modified: 2017-05-07 18:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Elle Stone 2014-09-02 14:47:59 UTC
On the one hand, Gaussian Blur is always "gamma corrected" so it looks like it was done in a true linear gamma working space, regardless of whether linear or gamma precision is chosen. On the other hand, painting and normal blend are only "gamma corrected" at linear precision. 

This is inconsistent because the user is given a choice for some editing operations but not for others. Radiometrically correct Gaussian Blur does require being done using linear RGB channel values. But there are legitimate artistic uses for "gamma error blurs" done in perceptually uniform color spaces. So the user should be given a choice when doing a Gaussian Blur.
Comment 1 Téo Mazars 2014-09-02 21:49:57 UTC
Indeed. This might also apply to some others operations that require color blending: others blurs, pixelize, ... Do we want a "color space" drop down menu in each of these operations? This will slightly increase the cluttering.

If so, such parameter could be added to each operation that needs it, making this bug belong to GEGL. This would be an easy task for a new contributor looking for wetting his hands in GEGL's source code.

Other opinions before I move this to GEGL?
Comment 2 Elle Stone 2014-09-15 13:34:48 UTC
I checked some basic editing operations to see how/if one could produce results "as if" editing in a true linear gamma sRGB color space (without the background BABL conversions), while actually editing in default BABL/GEGL/GIMP using the GIMP built-in perceptually uniform sRGB color space. 

Of the operations that I checked:

* 15 produce linear results whether using linear or gamma precision. At gamma precision some, but not all, will produce "perceptual" results if the gamma hack is used.

* 21 will produce linear results at linear precision if the gamma hack is used.

* 1 operation produces linear results at linear precision without using the gamma hack.

* 2 operations (drawing a gradient and Invert Colors) always produce perceptual results, regardless of the precision.

* The layer Blend modes produce linear results at linear precision and perceptual results at gamma precision, so if the precision is changed, the result of the Blend mode changes. Presumably most of the Paint tools (brushes, etc) behave like the Blend modes, producing linear results at linear precision and perceptual results at gamma precision.

From a user perspective this is very confusing and complicated. It might be simpler and more versatile to:

1. Remove the linear vs gamma variations on the "Image/Precision menu", cutting the number of user choices in half.

2. Provide all editing operations, blend modes, and Paint tools with the option to be done using either linear RGB or perceptually uniform RGB. This might require doubling the number of Blend modes. The only exceptions might be editing and/or exporting certain "8-bit-only" file formats.

3. Provide default settings for each operation to give the user a hint as to whether linear RGB or perceptually uniform RGB might be preferable, but also allow the user the option to change the default for each operation.
Comment 3 Øyvind Kolås (pippin) 2016-12-27 01:59:10 UTC
The linear vs gamma choice in precision should be removed. In 8bpc mode linear data leads to massive qunatization in the dark regions. Having additional linear layer/paint modes is also the reasonable way to deal with compatibility as well as permitting the memory savings sRGB TRC (gamma corrected) storage provides for 8bpc.
Comment 4 Michael Natterer 2017-04-29 17:16:54 UTC
The issue in the bug title is fixed, layer and paint modes
don't depend on the layer's pixel format any longer, I think
we can close this as FIXED, any objections?
Comment 5 Øyvind Kolås (pippin) 2017-04-29 18:39:10 UTC
Yes, this can be closed - if there is remaining issues similar to this, separate bugs would be desirable.
Comment 6 Elle Stone 2017-04-29 18:41:49 UTC
(In reply to Øyvind Kolås from comment #3)
> The linear vs gamma choice in precision should be removed.

+1


(In reply to Michael Natterer from comment #4)
> The issue in the bug title is fixed, layer and paint modes
> don't depend on the layer's pixel format any longer, I think
> we can close this as FIXED, any objections?

None from me, fwiw.
Comment 7 Michael Natterer 2017-04-29 19:14:27 UTC
Allright, thanks :