Sign up now! · Forgot password?
RSS/Atom feed identi.ca Twitter

FW: Layer mode Overlay - technical question

This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

FW: Layer mode Overlay - technical question Sally C. Barry 05 Sep 05:56
FW: Layer mode Overlay - technical question William Skaggs 05 Sep 08:56
Sally C. Barry
2006-09-05 05:56:44 UTC (almost 12 years ago)

FW: Layer mode Overlay - technical question

Hello All!

I'm looking at the Layer Modes for the Glossary and one of my references is the C source code. I have a question about it which is mainly aimed at any technically-oriented people (developers) on the list.

In app/composite/composite-generic.c, the comments for the function gimp_composite_overlay_any_any_any_generic() say:

* Perform an RGB[A] overlay operation between the pixel sources * ctx->A and ctx->B, using the generalised algorithm: *
* D = A * (B + (2 * B) * (255 - A))

But the code does:

dest[b] = INT_MULT(src1[b], src1[b] + INT_MULT(2 * src2[b], 255 - src1[b], tmpM), tmp);

which looks to me like:

D = A * (A + (2 * B) * (255 - A))

Is this an error in the code, or simply an error in the comment, does anyone know?

Thank you!

Sally

William Skaggs
2006-09-05 08:56:24 UTC (almost 12 years ago)

FW: Layer mode Overlay - technical question

From: "Sally C. Barry"

Is this an error in the code, or simply an error in the comment, does anyone know?

Well, it's certainly an error in something, but we haven't quite figured out how to handle it -- the problem is that straightforwardly fixing the mistake would change the appearance of existing xcf files, and we don't like to do that.

See Bug 162395 ? Soft Light and Overlay modes are identical:

http://bugzilla.gnome.org/show_bug.cgi?id=162395

for a lengthy discussion of this issue.

-- Bill


______________ ______________ ______________ ______________ Sent via the CNPRC Email system at primate.ucdavis.edu