Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Is the interpretion of the code in "case ModulusAddCompositeOp" correct, that if pixel (= Sc + Dc; why not Sca + Dca like in the SVG specification?) is larger than QuantumRange (= 1) or smaller than 0 (which is equivalent to pixel is in the interval [0 1]) the equation
pixel=(Sa*Da*pixel+Sa*Sc*(1.0-Da)+Da*Dc*(1.0-Sa))
<=> Sc + Dc = Sa * Da * (Sc+Dc) + Sa * Sc * (1.0-Da) + Da * Dc * (1.0-Sa)
<=> Sc + Dc = Sa * Da * (Sc+Dc) + Sca * (1.0-Da) + Dca * (1.0-Sa)
<=> Sc + Dc = Sa * Da * Sc + Sa * Da * Dc + Sca - Sca * Da + Dca - Dca * Sa
<=> Sc + Dc = Sca * Da + Sa * Dca + Sca - Sca * Da + Dca - Dca * Sa
<=> Sc + Dc = Sca + Dca #which holds only in the special case that Sa = Da = 1
<=> Dca = Sc + Dc - Sca
which looks different from the expected plus-equation Dca = Sca + Dca that should be applied within [0 1]; according to the SVG specification for plus: