I would like to implement the following layer mode in the GIMP:
1) Transform destination and source pixels to HSL space.
2) Note original destination pixel saturation.
3) Set luminance component of destination pixel to luminance component
of source pixel.
4) Transform destination to HSV color space.
5) Set saturation of destination pixel to original saturation of
I'm assuming destination is also the result of the operation. Not sure
how GIMP handles this, though.
The purpose of the mode is to colorize a greyscale image while keeping
both the saturation and hue data of the color layer and the luminance
data of the greyscale image. Existing modes (as far as I see)
unfortunately either mess up the color information or the luminance
So, the question is, what changes would I need to make to add this
I would be very grateful for any hints. :)
Gimp-developer mailing list