It is currently Fri May 03, 2024 3:07 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Learn GEGL graph
PostPosted: Mon Jul 12, 2021 9:40 am  (#21) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 121
Location: France
Thanks, Nidhogg, for your interesting feedbacks! :tyspin

7) Program plug-ins with "GEGL graph"

You can use your "GEGL graph" directly in your code, like this:
pdb.python_gegl(img, layer, '''
   yourGeglGraphText
''')

If you want to replace a value by a variable, you can do it, for example, this way:

Replace:
pdb.python_gegl(img, layer, '''
   noise-reduction
   difference-of-gaussians radius1=0.66 radius2=0.22
   gimp:desaturate mode=value
''')
by:
pdb.python_gegl(img, layer, '''
   noise-reduction
   difference-of-gaussians radius1=''' + str(radiusOne) + ''' radius2=0.22
   gimp:desaturate mode=value
''')

Note: you have to have installed gegl_command.py plugins.

Have fun! :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Fri Jul 16, 2021 11:33 am  (#22) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 121
Location: France
Here is a better example (photo to cartoon):

id=myStart

noise-reduction
domain-transform n-iterations=5
difference-of-gaussians radius1=1 radius2=0.33
gimp:desaturate mode=value
levels in-low=0.007 in-high=0.009
invert-gamma
rgb-clip

multiply aux=[ ref=myStart saturation scale=1.8 hue-chroma lightness=10 ]
domain-transform n-iterations=5
domain-transform n-iterations=5
domain-transform n-iterations=5
noise-reduction

Here is a result of this example:
Attachment:
small_farm_k7862-1_bdGegl.jpg
small_farm_k7862-1_bdGegl.jpg [ 304.01 KiB | Viewed 8761 times ]

Enjoy! :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Thu Jul 22, 2021 11:59 am  (#23) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 121
Location: France
8) Go further

The reference site is: gegl.org.

The available operations are at https://www.gegl.org/operations.
On the right side, an alphabetical (according to technical names) list of operations (friendly names).
On the left side, a classification of the operations.

For each operation, some pieces of information, here are the main ones:
  • a list of parameters. Each parameter is indicated by a black thick vertical line at the left of it. For each parameters, some pieces of information, here are the main ones:
    • "name" : what you have to use in your "GEGL graph" (just before an "=" sign)
    • type : the type of value you can write just after the "=" sign. Here are the main ones:
      • boolean : 1 (that means "True") or something else (that means "False")
      • color : string that stands for a color (for example: #fff, #808080, aqua, rgb(0,1,0), rgba(0.0,0.5,0,0.8))
      • curve : I don't know.
      • double : number with decimal point
      • enum : string among a list of accepted ones. "gegl.org" doesn't give this list, but the "GEGL graph" window does (after you have typed the "=" sign).
      • filepath : I don't know (I guess it's a string)
      • format : I don't know.
      • int : number without decimal point
      • object : I think you can't use these parameters in "GEGL graph" window.
      • pointer : I think you can't use these parameters in "GEGL graph" window.
      • seed : integer ?
  • "name" : what you have to use in your "GEGL graph" (as operation name). You don't have to write "gegl:".
  • "pads" : Here, you can know if "aux=[ ]" can be used

Notes:
  • "gegl.org" doesn't explain any "gimp:" operations
  • I think you can't use parameters of "image-compare" in "GEGL graph" window.
  • "threshold" is different from "gimp:threshold". The latter is equivalent to "Colors -> Threshold". The former is more powerful.

As you can see, my knowledge is based on experience, is incomplete and probably inaccurate. Feel free to complete or fix it.

:seeya

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Thu Jul 22, 2021 2:17 pm  (#24) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2019
Posts: 131
Location: Lake Havasu City, Arizona, USA
:tyspin I am very grateful for your helpful information. I haven't tried GEGL yet, but your information is inspirational.
:spock

_________________
Charles


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Tue Nov 23, 2021 8:55 am  (#25) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
GEGL Graph deprecates alpha to logo.

Learn the syntax guys at GEGL.org
https://streamable.com/xphvb0
https://streamable.com/ifmpxn
https://streamable.com/2in0g0
https://streamable.com/dajm7u

Finally a peek at the future
https://streamable.com/2uhfkv


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Tue Nov 23, 2021 8:56 am  (#26) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
Try this on medium large sized text.

gegl:color-overlay value=#fbff00

gegl:dropshadow x=0.00 y=0.00 radius=0.00 grow-shape=circle grow-radius=6 opacity=1 color=#2868ff

gegl:dropshadow x=0.00 y=0 radius=0.00 grow-shape=circle grow-radius=6 opacity=1 color=#dcfcff

gegl:dropshadow y=5 x=4 radius=0.90 grow-radius=0


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Tue Nov 23, 2021 9:01 am  (#27) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2425
contrast_ wrote:
GEGL Graph deprecates alpha to logo.

Learn the syntax guys at GEGL.org
https://streamable.com/xphvb0
https://streamable.com/ifmpxn
https://streamable.com/2in0g0
https://streamable.com/dajm7u

Finally a peek at the future
https://streamable.com/2uhfkv


Interesting but unless you post the GEGL command as a separate text file, very-very tedious to reproduce from a video.

_________________
Image


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Tue Nov 23, 2021 12:21 pm  (#28) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
recursive-transform time=0 transform=matrix(0.85676532983779907,-0.083190269768238068,-1.0763975295356106e-19,0.15398488938808441,1.0494217872619629,-2.1621131194246602e-19,35.636863708496094,106.15763092041016,1) first-iteration=1 iterations=0 fade-opacity=1 paste-below=no sampler-type=nohalo

gegl:color-overlay value=#dbdbdb


(IMAGE FILE OVERLAY)
svg:src-atop aux=[gegl:layer src=/home/contrast/Pictures/Magic/Gradient_overlays/green.png]



(bevel)
gaussian-blur
emboss type=bumpmap azimuth=30 elevation=45 depth=12

gegl:dropshadow x=0.00 y=0 radius=0.00 grow-shape=circle grow-radius=1 opacity=2 color=#ffffff

gegl:dropshadow x=0.00 y=0 radius=0.00 grow-shape=circle grow-radius=6 opacity=1 color=#ffffff

gegl:dropshadow x=0.00 y=0.00 radius=0.00 grow-shape=circle grow-radius=6 opacity=1 color=#000000


gegl:dropshadow opacity=0.4 radius=0.1 x=-1.8 y=2.8

gegl:long-shadow style=finite angle=152.94 length=11 midpoint=100 midpoint-rel=0.5 color=#000000 composition=shadow-plus-image




here is a link to the image file I used. https://imgur.com/1BveJug
you need to replace the file path with your own.

Image


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Thu May 19, 2022 11:48 am  (#29) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
cli345 wrote:
Here is a better example (photo to cartoon):

id=myStart

noise-reduction
domain-transform n-iterations=5
difference-of-gaussians radius1=1 radius2=0.33
gimp:desaturate mode=value
levels in-low=0.007 in-high=0.009
invert-gamma
rgb-clip

multiply aux=[ ref=myStart saturation scale=1.8 hue-chroma lightness=10 ]
domain-transform n-iterations=5
domain-transform n-iterations=5
domain-transform n-iterations=5
noise-reduction

Here is a result of this example:
Attachment:
small_farm_k7862-1_bdGegl.jpg

Enjoy! :)


I want to make this into a GEGL filter but the only way I know how is to make two extra copies of saturation and hue-chroma.


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Thu May 19, 2022 11:56 am  (#30) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
cli345, Just by reading your post I can tell that you are a lot smarter then me. You should be able to look at my source code and figure out how to make gegl filters of your own. You will likely end up beating me at this game.

https://github.com/LinuxBeaver/


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sun Sep 11, 2022 10:21 am  (#31) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
cli345 wrote:
Here is a better example (photo to cartoon):

id=myStart

noise-reduction
domain-transform n-iterations=5
difference-of-gaussians radius1=1 radius2=0.33
gimp:desaturate mode=value
levels in-low=0.007 in-high=0.009
invert-gamma
rgb-clip



multiply aux=[ ref=myStart saturation scale=1.8 hue-chroma lightness=10 ]
domain-transform n-iterations=5
domain-transform n-iterations=5
domain-transform n-iterations=5
noise-reduction

Here is a result of this example:
Attachment:
small_farm_k7862-1_bdGegl.jpg

Enjoy! :)



This is awesome. I want to make a GEGL filter of this that will run as a normal GEGL operation. Are you or anyone else interested? I'll give you full credit for discovering it and the only change I will make is to replace the noise-reduction at the last line with mean-curvature.

Levels, Difference of Gaussian, Saturation, Lighting, and Mean Curvature will be the editable parts of the filter.


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Tue Sep 13, 2022 1:05 am  (#32) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
I've tried all 3 and the GMIC version works best for me.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 03, 2022 4:35 am  (#33) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
I'm trying to scale an image using GEGL graph, but it only applies to the layer.
I'd like it to scale the whole image.
My code looks like this:
scale-size
   origin-x=0
   origin-y=0
   x=640
   y=480
   sampler=lohalo

It does scale the layer, but the image is still as big as it was.
Is it possible at all to do this with GEGL graph?

PS.: I've also tried scale-size-keepaspect - but not the result I want either.

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 03, 2022 1:04 pm  (#34) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
GEGL cannot interact with multiple Gimp layers in Gimp 2.10. The scale command is correct but there is no way to do that yet.


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 03, 2022 1:10 pm  (#35) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
My image has one layer only. It's just a jpg.
But ok to know that it's not possible yet.
Thanks for your answer.

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 03, 2022 1:12 pm  (#36) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
nelo wrote:
My image has one layer only. It's just a jpg.
But ok to know that it's not possible yet.
Thanks for your answer.

yeah it can't resize Gimp's canvas as that is outside of GEGL. It could be possible in the future.


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 03, 2022 1:17 pm  (#37) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
That's really a pity, isn't it?

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 03, 2022 3:00 pm  (#38) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
nelo wrote:
That's really a pity, isn't it?


GEGL is about a specific bitmap. When you scale an image you have to scale layers (and their mask, and the channels), but also paths. And layers that are not the size of the image need their offsets to be changed.

GIMP uses GEGL, but GIMP isn't all GEGL.

_________________
Image


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 10, 2022 11:59 am  (#39) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1415
ofnuts wrote:
nelo wrote:
That's really a pity, isn't it?


GEGL is about a specific bitmap. When you scale an image you have to scale layers (and their mask, and the channels), but also paths. And layers that are not the size of the image need their offsets to be changed.

GIMP uses GEGL, but GIMP isn't all GEGL.


GEGL in theory can have its own virtual equal of Layer Groups, Mask and Channels. But they will all be represented in Gimp as one layer.

However in the future Gimp's team will likely make it where GEGL can apply effects to multiple layers in once in Gimp. btw, accroding to archive.org GEGL Originally stood for Gimp's E Graphics Library. I guess the E can be "eternal" who knows? The bottom line is that means it was designated for Gimp.


Top
 Post subject: Re: Learn GEGL graph
PostPosted: Sat Dec 10, 2022 3:57 pm  (#40) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
contrast_ wrote:
The bottom line is that means it was designated for Gimp.


Yes, but not to replace it. The engine isn't the car.

_________________
Image


Top
Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts What does GEGL graph do ?

65

No new posts Get use to using GEGL Graph syntax.I can't make a filter of everything

13

No new posts Attachment(s) Long time GEGL Graph Glitch solved. Need Help testing bevel update

2

No new posts Attachment(s) How to select color from light spectrum graph ?

2

No new posts Attachment(s) GEGL "Glass over Text' is STAND ALONE BUT NOW PART OF GEGL EFFECTS

5



* Login  



Powered by phpBB3 © phpBB Group