Hello again,

Given that the GEGL solution is not yet perfect, as per the latest relevant bug 


...I wonder if I may help with an algorithm that could be used either in GIMP 
internally or in GEGL.  I arrived at the solution by trying various scripting 
approaches with ImageMagick, in my effort to find a way of reducing colour 
without accentuating luma noise.  The idea that the Lab colour space could be 
used isn't new, but the "trick" is to realize that the processing of the layer 
to be blended/transferred down with the Color mode should be done in RGB.  So 
the algorithm is simple: process the layer as needed in RGB, then use its A and 
B Lab components to combine it with the L component of the layer below.  That's 
it, it works beautifully.

For those who use ImageMagick and can read its scripts, here it is:

convert test.tif -colorspace lab -channel r -separate test-L.tif
convert test-L.tif \( test.tif -gaussian-blur 0x2 -colorspace lab -separate \) \
-delete 1 -set colorspace lab -channel rgb -combine -colorspace rgb - | display 

Given how simple the solution is, I wonder if the developers would care to 
implement it in GIMP natively, not only in GEGL.  GEGL projection is still 
optional and isn't multi-threaded, so there's good reason to have a working 
solution in the GIMP core.

I hope this is of use.


>I believe you're asking for 
>which has been addressed when using GEGL.
>On Mon, Jul 26, 2010 at 6:33 AM, Charlie De <charlieco...@yahoo.com> wrote:
>Hello all,
>>I've joined up with this list to make an important suggestion for improvement.
>> In short, the Color and Value blending, transfer modes in GIMP do not work as
>>they should.  The problem is compounded by the fact that there seems to be no
>>application on Linux where these transfer modes work correctly.  In fact, it
>>seems all the major applications use the same or very similar algorithms.  So
>>the problem is the same in Krita (which uses GEGL as far as I know) and in
>>To confirm the problem, try this:
>>* Open an image in GIMP, preferrably one that has noticeable noise, and the
>>noise should be coloured, not merely monochromatic.
>>* Duplicate the image into a new layer and blur it, say by 5 points.
>>* Set the transfer mode of the blurred layer to Color.
>>What should happen is that the colour component of the noise should be
>>eliminated, but the luminance/value should remain the same.  This is not the
>>case, the result worsens the luminance noise!  If you have trouble seeing 
>>zoom into the image up to 400% or try an image with more obvious noise.  Also,
>>try increasing the blur factor.
>>Now by comparison, repeat the experiment in Photoshop.  You won't fail to 
>>that in Photoshop this works correctly.  The colours are more muted, perhaps
>>'leaking' over colour boudaries, but the luma noise is not made worse.
>>The same effect is at play the other way round, if Value is used instead of
>>Color (and it's the bottom layer that is blurred).  And the same effect is 
>>at play if instead of layer blending, the blending is done in the Fade command
>>In short, there is no correct way yet of using these transfer modes on Linux 
>>a proper solution is desperately needed.
>>By the way, I'm using GIMP 2.6.8.  I appreciate that 2.7.1 is using GEGL as 
>>2.8, but I doubt that will in itself offer the solution, because Krita is 
>>GEGL and the problem there is the same.
>>Thank you for listening and good luck with the coding.
>>Gimp-developer mailing list

Gimp-developer mailing list

Reply via email to