Onkel Hatti wrote:
The mode can be changed, when the layer is added.
The mode can be changed in the script, where the layer is added.
I didn't want to have a dialog for choosing the desired mode, I just wanted
just a mouseclick
I understand and agree. Another option is to use the Grain Merge layer mode, which will provide a degree of contrast control somewhere between the Hard Light and Overlay modes.
Lenna-modes.jpg [ 127.64 KiB | Viewed 484 times ]
For your script, I would point out that if you perform a 'gimp-context-push' at the beginning, and a 'gimp-context-pop' at the end, then it will not be necessary to save and restore your foreground color. Same result, just a different approach.