GNOME Bugzilla – Bug 726557
[Patch] Port of color-exchange from GIMP to GEGL
Last modified: 2014-11-10 20:56:00 UTC
This patch contains a port of color-exchange from GIMP to GEGL. Right now the filter uses the R'G'B'A uint color space but may be easily ported to a floating point color space if necessary.
A test is missing, as I don't know how to provide a color in R'G'B'A color space as input parameter in the XML file. Is this even possible or does one need to convert between RGBA and R'G'B'A by hand?
The patch is missing :) And for colors, we normally use the dedicated GEGL color type.
Created attachment 272185 [details] [review] Patch including the ported filter. Added the missing patch. ;)
The XML expects RGBA colors, you can use GeglColor and gegl_color_set_pixel to do a quick conversion. If you built with introspection the following python will give you an RGBA color string for the sRGB in "value" (set_components is the introspection alias of set_pixel): from gi.repository import Gegl Gegl.init(None) value = [128, 128, 128] c = Gegl.Color() c.set_components(Gegl.format("R'G'B' u8"), value) c.get_property("string")
I have to admit that we suck. Not only do we let patches rot in bugzilla, we let them rot until somebody else submits a patch doing the same, see bug 739862. Sorry about that. And sorry to disregard this patch, because the one in bug 739862 is better: it does its stuff in floating point, and has a test case. *** This bug has been marked as a duplicate of bug 739862 ***
Oh ! I'm embarrassed, I did not see that someone else was already working on that plugin port. If I had known, I could have worked on another operation...