RSS/Atom feed Twitter
Site is read-only, email is disabled

Different results between RGB to Grayscale conversion and Desaturate (luminosity) filter

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

617105766.736110487.1434367... 15 Jun 12:30
  Different results between RGB to Grayscale conversion and Desaturate (luminosity) filter thomas.manni@free.fr 15 Jun 12:29
   Different results between RGB to Grayscale conversion and Desaturate (luminosity) filter Øyvind Kolås 15 Jun 16:22
thomas.manni@free.fr
2015-06-15 12:29:54 UTC (almost 9 years ago)

Different results between RGB to Grayscale conversion and Desaturate (luminosity) filter

Hi,
in master branch, using Colors > Desaturate (luminosity) and Image > Mode > Grayscale on a RGB image (whatever the image precision) gives different results.

This does not appear in branch gimp-2-8, since the 2 actions are computed the same way (using GIMP_RGB_LUMINANCE).

In master, for Desaturate (luminosity) filter, GIMP_RGB_LUMINANCE is used on a R'G'B'A buffer. For Grayscale conversion, drawables' buffers formats are converted to babl_format Y (or Y' according to the initial format).

As these 2 actions seem to have the same goal (obtain the relative luminance), shouldn't we obtain the same result ?

Thomas Manni

Øyvind Kolås
2015-06-15 16:22:18 UTC (almost 9 years ago)

Different results between RGB to Grayscale conversion and Desaturate (luminosity) filter

On Mon, Jun 15, 2015 at 2:29 PM, wrote:

in master branch, using Colors > Desaturate (luminosity) and Image > Mode > Grayscale on a RGB image (whatever the image precision) gives different results.

This does not appear in branch gimp-2-8, since the 2 actions are computed the same way (using GIMP_RGB_LUMINANCE).

In master, for Desaturate (luminosity) filter, GIMP_RGB_LUMINANCE is used on a R'G'B'A buffer. For Grayscale conversion, drawables' buffers formats are converted to babl_format Y (or Y' according to the initial format).

As these 2 actions seem to have the same goal (obtain the relative luminance), shouldn't we obtain the same result ?

I am not sure they should behave the same way / give the same result - nor that any of the results are ideal yet.

What is GIMP_RGB_LUMINANCE? is it the equivalent of the V component of HSV (MAX(MAX(R,G),MAX(G,B)) ?

It is possible that GIMP could ask the user how they want to derive a grayscale/desaturated version. Perhaps only ask when doing desaturate and do the best we can do for the implicit conversion when going from color to grayscale mode - something like the Luminance component of CIE Lab normalized to 0.0-1.0 range.

/pippin