Seems pretty simple to me. I agree they didn't explain in a friendly way.
C is the result. easy. It's per-channel. That is, for 'Darken', the
resulting value in a given channel is either A[channel] or B[channel]
depending on which of A and B's value for that channel is lower.
For example
  A = #00ff88 hex
  B = #448822 hex
  combined C = #008822 hex
for 'darken' mode

A is the overlying pixel value, that is being 'applied' to
B, which is the underlying pixel value.

As to the specific blending mode, 'vivid light', You will need to look
at which of GIMP's modes correspond to Color Burn/Dodge,
create a layer for each,
and normalize the color values from the ranges 0..127, 128..255
(hint: filling with #7f7f7f, Divide mode, doubles the color values)

before partially applying each layer to the destination layer.

This partial appllication is the tricky part. For each channel, you
want to apply the burn layer where the values are <= 127, otherwise
the Dodge layer. IMO the easiest way to do this is to use Decompose to
separate out the RGB channels of the underlying layer and the Vivid
Light layer, and combine them using layer masking and the appropriate
blending modes.

(It would be almost trivial to implement this as a GEGL op, which is
something you could consider for the future.)
Gimp-user mailing list

Reply via email to