Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Colored c2g-A idea for a gegl based plugin

Wed Jan 18, 2012 7:58 pm

I have no idea how to wrote a gegl based plugin or how call with a script gegl operation
but on the other hand would be only needed a little tweak to a existing operation and the effect is already well tested
(HERE http://www.flickr.com/groups/gimpusers/ ... search=c2g )

basically the plugin is still hypothetical ,nevertheless already written at more then 90%

the name "Colored c2g" is a oxymoron, may be better names but the effect is worth a try

the plugin should
1 )create a duplicate of the active layer
2) apply the c2g gegl operation on the duplicate
3) Optional apply a slight blur to the original (most of sensation of sharpness come from
"greyscale" not from the "color component, when merging mode as "color or value are used a slight blur on the layer that will give the color may avoid ugly sharp color transition of isolated pixel, without reducing sharpness in a perceptible way )
4) give a few option to merge down as


Value
Grain Merge
Hybrid
(= in the virtual layer stack the original as bg, the c2g layer above in value mode,on top another dup of the original in soft light mode; in this case "opacity" control is only for the top layer opacity the other are left to 100 )
with control on opacity

If gegl plugin are nodes the idea may be used to explain how use the nodes, or at least how call gegl operation from script

and i am sure that the effect is interesting often similar to hdr/tonemapping but less unnatural (and less obvious)

Re: Colored c2g-A idea for a gegl based plugin

Wed Jan 18, 2012 11:39 pm

I can't see how you would call a GEGL operation from within a script, pity though.

Re: Colored c2g-A idea for a gegl based plugin

Thu Jan 19, 2012 12:08 am

gimp should be based more and more on gegl but is still impossible call gegl operations ?

Re: Colored c2g-A idea for a gegl based plugin

Thu Jan 19, 2012 5:43 am

PhotoComix wrote:gimp should be based more and more on gegl but is still impossible call gegl operations ?

If I am not mistaken PC, all plugins will be based on GEGL by Gimp 3.0. Note that GEGL is the graphics foundation that will allow 32-bit processing.

Re: Colored c2g-A idea for a gegl based plugin

Thu Jan 19, 2012 6:26 am

All plug-ins will be dead soon, now we have to talk about "GEGL nodes" instead, which means, everyone has to recode everything. Youhou ! :bawl

Re: Colored c2g-A idea for a gegl based plugin

Thu Jan 19, 2012 10:18 am

It's taken nearly 3 years for 2.8; not going to worry about 3.0x. lol

Heck, I might not worry about 2.8x if someone doesn't figure out a way to compile Mathmap for 64-bit GIMP (no reason to install 2.8 without going all out 64-bit imo; it's now time). Just again, wanted to thank you Partha for all that you did with the 2.7x builds; even touted at DPR about you when someone there mentioned that they wanted to install your build but wasn't sure. I still have GIMP 1.2.4 by the way and have had many occasions to open it (even opens while 2.6x is open; lol). More then likely I'll stick with 2.6x for a few months (I've dived into GIMP new releases in the past and have regretted doing so more then a few times; lol). :)

Re: Colored c2g-A idea for a gegl based plugin

Thu Jan 19, 2012 9:03 pm

Thanks Lyle! Appreciate your vote your confidence. :)

Re: Colored c2g-A idea for a gegl based plugin

Mon Sep 25, 2023 8:26 pm

I am revisiting this old 2012 thread because I recreated the GEGL graph that this user described way back then.

I recreated the GEGL graph they described and let me just say this user was way ahead of their time for knowing of GEGL virtual layers AKA composers in 2012. Paste this in Gimp's GEGL graph filter to use this syntax.

Preview of the (color to gray with color) effect
ahead.png
ahead.png (1.45 MiB) Viewed 576 times


With Grain Merge
Code:
id=1
gimp:layer-mode layer-mode=normal blend-space=rgb-perceptual aux=[ ref=1 c2g      ]
gimp:layer-mode layer-mode=grain-merge blend-space=rgb-perceptual aux=[ ref=1 gaussian-blur std-dev-x=3 std-dev-y=3  ]



With HSL Color
Code:
id=1
gimp:layer-mode layer-mode=normal blend-space=rgb-perceptual aux=[ ref=1 c2g      ]
gimp:layer-mode layer-mode=hsl-color blend-space=rgb-perceptual aux=[ ref=1 gaussian-blur std-dev-x=3 std-dev-y=3  ]





UPDATE more graphs with hsv value and reverse order of grain merge and normal
test2.png
test2.png (1.62 MiB) Viewed 576 times


Code:
id=1
gimp:layer-mode layer-mode=normal blend-space=rgb-perceptual aux=[ ref=1 gaussian-blur std-dev-x=3 std-dev-y=3    ]
gimp:layer-mode layer-mode=hsv-value blend-space=rgb-perceptual aux=[ ref=1  c2g   ]



Code:
id=1
gimp:layer-mode layer-mode=normal blend-space=rgb-perceptual aux=[ ref=1 gaussian-blur std-dev-x=3 std-dev-y=3    ]
gimp:layer-mode layer-mode=grain-merge blend-space=rgb-perceptual aux=[ ref=1  c2g   ]



If one or more person request I will turn this into a filter, if not It will forever remain a graph.
Post a reply