Skip to content

gegl: new GeglColor API.

Jehan requested to merge wip/Jehan/geglcolor into master

I am going to replace various usages within GIMP code from outdated GimpRGB to GeglColor. Both in core (which should really store intermediate color data as untouched as possible until the moment we use it) and in libgimp API. But I felt it missed a few functions to be really useful.

This MR so far adds this:

  • gegl_color_get_bytes() and gegl_color_set_bytes(): these are introspectable variants of gegl_color_get_pixel() and gegl_color_set_pixel() which will allow plug-ins in other languages than C to access raw pixel data too.
  • gegl_color_get_rgba_with_space() and gegl_color_get_rgba_with_space() because the gegl_color_(g|s)et_rgba() variants are simply old-style without a space argument, so it's not really "space-invasion" friendly.

I'm thinking that it would be nice to have at least some gegl_color_(g|s)et_cmyk() API too at least. The gegl_color_(g|s)et_bytes() are generic and would work for CMYK too, but it's much nicer if we had a simple-to-use function as we eventually want CMYK to be a first class citizen too.

Merge request reports