[Gegl-developer] Disparities in Subtract Blend Math and Final Result


Not sure whether to post this on GIMP or GEGL list. So, kindly suggest if
this question doesn't belong here.

I have been trying to implement GEGL blend modes, Colour Dodge and Subtract,
in Python taking the GEGL implementations as the reference. The Dodge has
been implemented and the resultant images are matching with the ones
exported from GIMP. However, the results for Subtract despite its seemingly
straightforward math and implementation are starkly different from the ones
obtained using GIMP.

Subtract  (as per documentation): max(Background - Foreground, 0). It seems
Subtract doesn't use alpha information for blending.

I intend to apply Subtract after couple of Dodge operations. Since, I saw
disparities in the results, tried to test Subtract independently with BG
So, tried with two plain RGB images (alpha set to 1) - BG: (205,36,50), FG:
(125,38,85). And the resultant colour, Blended: (170, 234, 0) which doesn't
follow the math above.
Any idea if the underlying math is different than the aforementioned one? Or
is this the composite generation matter handled by GIMP. The colors were
normalized between [0, 1] prior to blending.
Any help would be appreciated.

- Nikunj

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