On 03/03/2011 02:00 AM, "Jörn P. Meier" wrote:
> Hi,
>
> 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
>      destination pixel.
>
> 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
> information.
>
> So, the question is, what changes would I need to make to add this
> layer mode?
>
> I would be very grateful for any hints. :)

There is already a patch for that (using the CIELCH space instead), see 
the most recent patch in
https://bugzilla.gnome.org/show_bug.cgi?id=325564

  / Martin


-- 

My GIMP Blog:
http://www.chromecode.com/
"Why GIMP 2.8 is not released yet"
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to