[Gimp-docs] FW: Layer mode Overlay - technical question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Gimp-docs mailing list
Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs

[Index of Archives]     [Video For Linux]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [Scanners]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux