I have made some experiments with scripts (well... mostly "Frankenstein" experiments inspired by others scripts and examples), and i wrote something that reproduce the method saulgoode has suggested to me.
This is the result
Attachment:
relative-desat.scm [4.23 KiB]
Downloaded 113 times
I start by saying that was written in 2 1/2 hours, does not have any form of control on possibile error on the source layer and probably also badly programmed, but it works, so if someone wants to play with it...
After you apply it there are 3 layers, all in "Normal" mode:
* SourceDesat: the original one, at the bottom of the layers stack
* DecrSat: the layer with the layermask and the decreased (or increased) saturation (and lightness), at the top of the layers stack
* IncrSat: a layer that can be used to increase (or decrease) saturation (and lightness), below DecrSat
The control parameters are 5, saturation and lightness change value of DecrSat and IncrSat, and a value to increase or decrease the contrast of the layermask of DecrSat, to make more or less pronounced the effect.
The color to create the mask is taken from Foreground Color.
I try to put a control to eventually change it, using Foreground as default, but I fail. Many script i see on the net use "SF-COLOR xxxxxxx (car (gimp-context-get-foreground))", but if I try in the control seem to be always black, independently from the Gimp Foreground Color.
And thanks again for the tips!