On 06/02/2019 01:07 PM, Elle Stone wrote:
*A proposed alternative solution:*
What about writing code that gets the primaries from the user's chosen
RGB working space, and then conveys those primaries to the relevant
three functions in libgimpcolor/gimpcolorprofile.c,
libgimpcolor/gimprgb.h, and babl/babl-space.c , thereby replacing
hard-coded sRGB primaries with "AnyRGB" primaries?
Actually four functions, one each for linear and perceptual "sRGB" in
libgimpcolor/gimpcolorprofile.c, which would be rewritten to use
"User-chosen RGB primaries". Plus the LUMINANCE defines in gimprgb.h
would need to be replaced with something like
"get_Y_values_from_user_chosen_RGB_primaries". And the current "sRGB" in
babl/babl-space.c likewise would need to be replaced with "User-chosen RGB".
The user's chosen RGB profile's RGBXYZ matrix would need to be conveyed
to these functions every time the user-chosen color space was changed.
There would of course need to be a couple of new functions for making
"sRGB-built-in fallback color space" for assigning to images without any
embedded ICC profile, and for use when users open images that aren't
actually in RGB matrix working spaces. Though it would be nice to allow
users to specifiy which actual color spaces to use in these two case,
with built-in sRGB as the default fall-back color space.
Anyone? Comments? Possible? If not possible, why not?
Certainly babl knows what color space an image is in, and so does GIMP.
So why can't this information be used directly, instead of by writing
"space" functions that live alongside "sRGB only" functions?
gimp-developer-list mailing list
List address: firstname.lastname@example.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives: https://mail.gnome.org/archives/gimp-developer-list