[Gimp-developer] Code for editing in non-sRGB color spaces

I've been looking at the relevant babl/GEGL/GIMP code for enabling GIMP to edit in color spaces other than sRGB. Here are two questions:

1. Code for retrieving colorant information from an ICC RGB working space profile embedded in an image is already in https://github.com/GNOME/gimp/blob/master/libgimpcolor/gimpcolorprofile.c

Can the following babl functions from https://github.com/GNOME/babl/blob/master/babl/babl.h be used to send RGB colorant information (a 3x3 matrix) from GIMP to various babl functions that use Y and XYZ information?

 * babl_set_user_data: (skip)
* associate a data pointer with a format/model, this data can be accessed and
 * used from the conversion functions, encoding color profiles, palettes or
 * similar with the data, perhaps this should be made internal API, not
 * accesible at all from
void   babl_set_user_data     (const Babl *babl, void *data);

 * babl_get_user_data: (skip)
 * Get data set with babl_set_user_data
void * babl_get_user_data     (const Babl *babl);

2. Instead of full-blown support for editing in all RGB working spaces, would it be easier and maybe even better to start with hard-coding into babl/GEGL/GIMP an assortment of commonly-used RGB working space chromaticities, including:


and then pass a numerical identifier from GIMP to babl as the user switches from one image to another, so babl knows what chromaticities to use? This option of course would require that the user make an ICC profile conversion to one of the hard-coded RGB working spaces. But given the many ICC RGB profiles floating around that are not well-behaved and/or have odd TRCs, maybe this is the better option. Though support for "random RGB chromaticities" would be nice to eventually add in.


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