GNOME Bugzilla – Bug 761720
Layer mask posterization
Last modified: 2018-05-24 16:08:07 UTC
Created attachment 320638 [details] Sample XCF w/ layer mask posterization Layer mask shows high levels of posterization when viewed but does not exhibit posterization when applied. The attached XCF shows the problem (checked in 2.9.3). To reproduce: 1. Add layer mask (I used grayscale copy of layer as an example). 2. View mask. 3. Adjust levels of mask (bring black input point up to 127). A. Preview looks fine on canvas when adjusting B. Hitting "OK" on levels to apply changes shows immediate posterization.
(In reply to patdavid from comment #0) > Created attachment 320638 [details] > Sample XCF w/ layer mask posterization > > Layer mask shows high levels of posterization when viewed but does not > exhibit posterization when applied. > > The attached XCF shows the problem (checked in 2.9.3). > > To reproduce: > > 1. Add layer mask (I used grayscale copy of layer as an example). > 2. View mask. > 3. Adjust levels of mask (bring black input point up to 127). > A. Preview looks fine on canvas when adjusting > B. Hitting "OK" on levels to apply changes shows immediate posterization. Regarding the difference between preview and application of the operation should be a duplicate of bug #737925 Regarding the posterization the questions are: Is it different in gimp-2.8? Does it happen choosing float as image precision?
(In reply to Massimo from comment #1) > Regarding the difference between preview and application of > the operation should be a duplicate of bug #737925 > > Regarding the posterization the questions are: > > Is it different in gimp-2.8? It does _not_ appear posterized in 2.8.16. > > Does it happen choosing float as image precision? It does not happen when using 16-bit floating point image precision.
(In reply to patdavid from comment #2) > (In reply to Massimo from comment #1) > > Regarding the difference between preview and application of > > the operation should be a duplicate of bug #737925 > > > > Regarding the posterization the questions are: > > > > Is it different in gimp-2.8? > > It does _not_ appear posterized in 2.8.16. > > > So that's worth being investigated, probably layer masks are treated as linear and the level tool apply a gamma correction because the image is 8bit gamma.
This appears to be 8-bit linear-light quantization (which is, of course, particularly noticeable on dark images such as the layer mask in the sample XCF). If you copy the layer-mask in the sample XCF to a new layer (ie. drag it from Channels dialog to Layers dialog, forming a new layer), the mask appears fine. But if you then convert the *entire* image to Linear Light precision (still 8-bit) that new layer shows exactly as it did in the layer-mask preview. IIUC the intention was to *display* layer-mask previews in linear light (as befits a mask), not to *convert to* linear light (from some presumed gamma space, which doesn't apply to layer masks anyway).
This is the same as described in https://www.reddit.com/r/GIMP/comments/8in6vf/bit_depth_of_the_alpha_channellayer_mask I assume?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/844.