GNOME Bugzilla – Bug 762700
"burn" blending mode uses wrong algorithm.
Last modified: 2016-03-16 20:09:56 UTC
Writing down this until I, or someone else, have time to look at this. tmanni on IRC noted: > 17:09 < tmanni> in master, blend mode "burn" uses wrong formula https://git.gnome.org/browse/gimp/tree/app/operations/gimpoperationburnmode.c#n111 > 17:10 < tmanni> it should be : gfloat comp = 1.0 - MIN(1.0, (1.0 - in[b]) / layer[b]); > 17:12 < nomis> tmanni: the difference is only for negative in[b]'s, right? > 17:14 < tmanni> nomis: when layer[0] is near positive 0.0 > 17:15 < tmanni> we can see the current (bad) result painting with smooth brush with a color with at least one component to 0 : the hardness of the brush is not visible in the result > 17:16 < nomis> oh, i misread how you placed the parentheses. > 17:30 < tmanni> using the blend tool in burn mode: current: http://snag.gy/8F05x.jpg ; fixed formula: http://snag.gy/82LMn.jpg > 17:41 < tmanni> I use the formula defined here : https://www.w3.org/TR/compositing-1/#blendingcolorburn A quick look to the spec seems to say it's right though I seem to notice other differences with the spec. So if that is our reference, maybe there are other things to update? Also it seems we have the usage to keep hidden broken blending modes and make conversion for old XCF files, if the bug happened to exist in previous GIMP versions too. tmanni says that he cannot reproduce on a packaged GIMP 2.8, so that will hopefully not be needed. We should check to be sure anyway. Please credit "Thomas Manni" (cf. `git log` for the email address) if we push this.
It seems to be a consequence of the 2 latest commits on that file: https://git.gnome.org/browse/gimp/commit/app/operations/gimpoperationburnmode.c?id=8ca9bfc291496c6054bdaa8a9f2cfc883f66ab52 https://git.gnome.org/browse/gimp/commit/app/operations/gimpoperationburnmode.c?id=23f118632c76dc720489f68dba2e0b90f9ec1388 whose commit messages mention bug #744625
(In reply to Massimo from comment #1) > It seems to be a consequence of the 2 latest commits on that > file: > > https://git.gnome.org/browse/gimp/commit/app/operations/ > gimpoperationburnmode.c?id=8ca9bfc291496c6054bdaa8a9f2cfc883f66ab52 > > https://git.gnome.org/browse/gimp/commit/app/operations/ > gimpoperationburnmode.c?id=23f118632c76dc720489f68dba2e0b90f9ec1388 > > whose commit messages mention bug #744625 bug #744265
Looks like it. Massimo, did you confirm this? I have had no time yet to actually test anything, neither 2.8, nor Thomas' patch.
(In reply to Jehan from comment #3) > Looks like it. Massimo, did you confirm this? I have had no time yet to > actually test anything, neither 2.8, nor Thomas' patch. No, I did not test anything. I just wanted to add that probably there are conflicting requests and the proper solution should be found also considering the previous discussion.
(In reply to Massimo from comment #2) > (In reply to Massimo from comment #1) > > It seems to be a consequence of the 2 latest commits on that > > file: > > > > https://git.gnome.org/browse/gimp/commit/app/operations/ > > gimpoperationburnmode.c?id=8ca9bfc291496c6054bdaa8a9f2cfc883f66ab52 > > > > https://git.gnome.org/browse/gimp/commit/app/operations/ > > gimpoperationburnmode.c?id=23f118632c76dc720489f68dba2e0b90f9ec1388 > > > > whose commit messages mention bug #744625 > > bug #744265 That bug report has been recently reopened for this same reason and is now resolved. Probably the issue reported here is now fixed
Yes, that bug has the commit that fixes burn to work like before. *** This bug has been marked as a duplicate of bug 744265 ***