Re: Adapted and unadapted sRGB luminance values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both babl's RGB format and Y format are currently defined with a white
point of D65. Because of this, I believe the code's current luminance
values are correct.

Out of curiosity, how did you determine the Y values from the code in
gegl/operations/external/lcms-from-profile.c ? If you're somehow
dumping the icc profile and analyzing it, then it would make sense
that those are relative to D50 because icc mandates D50.

In other words, I think that the whitepoints are all currently
correct, because the constants in code are for converting between two
color spaces with D65, and the icc profile is relative to D50.

(As a side note, I believe some of the grayscale conversions are
currently very broken for other reasons. They operate in a gamma
space, but use constants that are meant for linear color spaces. I
meant to fix this before, but I forgot to at some point.)

On Sat, Sep 21, 2013 at 9:30 AM, Elle Stone <l.elle.stone@xxxxxxxxx> wrote:
> I was curious as to why the Babl/Gegl/Gimp code uses the unadapted
> sRGB luminance values rather than the adapted values.
>
> Quoting Lindbloom
> (http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html):
>
> Since the ICC specification and Adobe Photoshop both use a reference
> white of D50, the working space primaries that are specified relative
> to some other reference white must first be adapted to D50 before they
> may be used in a D50 environment, or be meaningfully compared with one
> another.
>
> If I understand him correctly, Poynton
> (http://www.poynton.com/PDFs/ColorFAQ.pdf) was talking about the
> conversion appropriate for sending signals to a monitor with a D65
> white point.  Y709 = 0.2125 R + 0.7154 G + 0.0721B
>
> Lindbloom unadapted and adapted sRGB "Y" values:
> unadpapted sRGB R, G, B luminance (Y):  0.212656 0.715158 0.072186
> adapted sRGB R, G, B luminance (Y):        0.222491 0.716888 0.060621
>
> The sRGB profile created in
> gegl/operations/external/lcms-from-profile.c has values very close to
> the Lindbloom adapted values:  0.222488 0.716904 0.060608.
>
> All the code in Babl/Gegl/Gimp that I could locate uses values very
> close to the Lindbloom *un*adapted Y values:
> ./babl/babl/base/rgb-constants.h:  #define RGB_LUMINANCE_RED    (0.212671)
> ./babl/babl/base/rgb-constants.h:  #define RGB_LUMINANCE_GREEN  (0.715160)
> ./babl/babl/base/rgb-constants.h:  #define RGB_LUMINANCE_BLUE   (0.072169)
> ./gegl/operations/common/snn-mean.c:#define RGB_LUMINANCE_RED    (0.212671)
> ./gegl/operations/common/snn-mean.c:#define RGB_LUMINANCE_GREEN  (0.715160)
> ./gegl/operations/common/snn-mean.c:#define RGB_LUMINANCE_BLUE   (0.072169)
> ./gegl/operations/workshop/snn-percentile.c:#define RGB_LUMINANCE_RED
>   (0.212671)
> ./gegl/operations/workshop/snn-percentile.c:#define
> RGB_LUMINANCE_GREEN  (0.715160)
> ./gegl/operations/workshop/snn-percentile.c:#define RGB_LUMINANCE_BLUE
>   (0.072169)
> ./gegl/opencl/colors.cl.h:"  #define RGB_LUMINANCE_RED    (0.212671f)
> ./gegl/opencl/colors.cl.h:"  #define RGB_LUMINANCE_GREEN  (0.715160f)
> ./gegl/opencl/colors.cl.h:"  #define RGB_LUMINANCE_BLUE   (0.072169f)
> ./gimp/libgimpcolor/gimprgb.h:#define GIMP_RGB_LUMINANCE_RED    (0.2126)
> ./gimp/libgimpcolor/gimprgb.h:#define GIMP_RGB_LUMINANCE_GREEN  (0.7152)
> ./gimp/libgimpcolor/gimprgb.h:#define GIMP_RGB_LUMINANCE_BLUE   (0.0722)
> ./babl/extensions/ycbcr.c:      luminance =  0.2126 * red + 0.7152 *
> green + 0.0722 * blue;
> ./babl/extensions/ycbcr.c:      luminance =  0.2126 * red + 0.7152 *
> green + 0.0722 * blue;
> ./gegl/operations/common/svg-saturate.c uses red:0.213 green:0.715 blue:0.072
>
> Elle
>
> --
> http://ninedegreesbelow.com
>
> Just because it's a standard, doesn't mean it's right.
> _______________________________________________
> gimp-developer-list mailing list
> List address:    gimp-developer-list@xxxxxxxxx
> List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list




[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux