Clamping of SVG-1.2 compositing results needs to be consider for HDR and wide gamut data
Submitted by John Marshall
Link to original bug (#474249)
Description
I have modified the generated operations ruby scripts to produce SVG compositing operations according to the draft SVG 1.2 working document. The formulae assume that the input and aux colour values have been pre-multiplied by the respective alpha values.
svg12-porter-duff.rb - generates the 12 porter-duff compositing operations. The calculated value will always be between 0 and the composited opacity so no clamping needs to be applied.
svg12-blend.rb - generates the remaining 12 compositing operations. The output colour values can exceed the allowed range and are therefore clamped between 0 and the output opacity.
The names used for the operations are taken directly from the working document ( except for multiply which is included as svg-multiply) so some aliased (duplicate) items are created by other-blend.rb
normal - a copy of src-over - common blending mode name. over - a copy of src-over - used in the gegl test program.
Version: git master