After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726557 - [Patch] Port of color-exchange from GIMP to GEGL
[Patch] Port of color-exchange from GIMP to GEGL
Status: RESOLVED DUPLICATE of bug 739862
Product: GEGL
Classification: Other
Component: operations
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2014-03-17 15:34 UTC by Christian Busch
Modified: 2014-11-10 20:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch including the ported filter. (6.01 KB, patch)
2014-03-17 17:15 UTC, Christian Busch
none Details | Review

Description Christian Busch 2014-03-17 15:34:51 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.
Comment 1 Christian Busch 2014-03-17 15:39:38 UTC
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?
Comment 2 Michael Natterer 2014-03-17 16:36:50 UTC
The patch is missing :) And for colors, we normally use the dedicated
GEGL color type.
Comment 3 Christian Busch 2014-03-17 17:15:54 UTC
Created attachment 272185 [details] [review]
Patch including the ported filter.

Added the missing patch. ;)
Comment 4 Daniel Sabo 2014-03-20 06:51:00 UTC
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")
Comment 5 Michael Natterer 2014-11-10 20:18:15 UTC
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 ***
Comment 6 Thomas Manni 2014-11-10 20:56:00 UTC
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...