On 04/05/2016 12:17 PM, Alexandre Prokoudine wrote:
Anything in that section can be moved to e.g. 3.2 provided there is a
developer working on any of the features listed there. At some point, the
unified transform tool was there too. Then Mikael came, and now it's a
v2.10 feature.

Two years ago I spent a lot of time trying to figure out how to pass RGB colorant information around GIMP and back to babl, but failed to make any progress.

I've been taking another look at the relevant babl/GEGL/GIMP code, but the task still seems to be way above my coding level. I suppose I should ask for help. So 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.

I don't think I understand the relevant portions of https://github.com/GNOME/babl/blob/master/docs/roadmap.txt. If I do understand, the plan in the roadmap seems to require rewriting major portions of babl/GEGL/GIMP.

If it were possible to use babl_set_user_data and babl_get_user_data to pass along colorant information, or else a numerical reference to a selection of hard-coded chromaticities for commonly-used RGB working spaces, this approach would seem to be a lot less invasive of the existing code.

Very likely I've overlooked major coding obstacles. And as I already noted, it's very likely that I simply don't have sufficient coding skills to add the ability to edit in non-sRGB color spaces to GIMP.


gimp-developer-list mailing list
List address:    gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list

Reply via email to