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 762700 - "burn" blending mode uses wrong algorithm.
"burn" blending mode uses wrong algorithm.
Status: RESOLVED DUPLICATE of bug 744265
Product: GIMP
Classification: Other
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2016-02-25 21:55 UTC by Jehan
Modified: 2016-03-16 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jehan 2016-02-25 21:55:14 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.
Comment 2 Massimo 2016-02-26 15:10:59 UTC
(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
Comment 3 Jehan 2016-02-28 16:52:28 UTC
Looks like it. Massimo, did you confirm this? I have had no time yet to actually test anything, neither 2.8, nor Thomas' patch.
Comment 4 Massimo 2016-02-28 17:56:19 UTC
(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.
Comment 5 Massimo 2016-03-08 18:43:20 UTC
(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
Comment 6 Michael Natterer 2016-03-16 20:09:56 UTC
Yes, that bug has the commit that fixes burn to work like before.

*** This bug has been marked as a duplicate of bug 744265 ***