Create a create a new component-curve-remap op
Right now there is no non-GIMP specific way to apply a color curve on a per-channel basis. It would be great to have something similar to contrast-curve
for non b&w images.
Relevant mailing list thread:
Hi!
I'm playing around with some Python code to develop pictures using GEGL. I would like to apply color curves to an image. > However, as far as I can tell, contrast-curve only works with one channel.
Right now my workaround is:
- Apply my operations such as contrast/saturation/exposure
- write-buffer
- Split the RGB channels manually and create a new buffer for each color channel
- Run each channel buffer through a separate pipeline (buffer-source -> contrast-curve -> write-buffer)
- Combine the three resulting buffers manually.
It does work, albeit at a snail's pace.
I imagine I must have missed something, is there a way to use contrast-curve on an individual channel, or an operation that would better serve my purpose?
Cheers,
Nathan Monfils
A different operation would be better, though the operation in question exists in GIMP and not in GEGL.
This is because the curves op in GIMP is not properly migrated/implemented to be part of GEGL, it is controlled with properties on a "configuration object" and thus as-implemented is only suitable for use internally in GIMP. It is probably better to create a new component-curve-remap op that is configured with a curve property in a similar way to curve-contrast; that can be configured similar to the curves tool in GIMP while also making sure it works well for values beyond the 0.0-1.0 range. The existing curves op in GIMP will likely end up disappearing if all ways of configuring it still are valid.
For now, please file a feature request in the GEGL issue tracker in gitlab.
/pippin