Post all Gimp scripts and script writing questions here
Mon Aug 24, 2020 10:28 pm
Hi Kevin.Great solutions.
Do you have a working example when it comes to choosing a color?
I am doing something very wrong because a tip from Massimo Valentini
- Code:
"color", gegl.gegl_color_new (b "# 700")
,
does not help.
Tue Aug 25, 2020 12:12 am
Started using the method kindly provided by Kevin for using GEGL.
Look here:
viewtopic.php?f=11&t=18691&start=30I like much more GEGL c2g !
Thanks again Kevin !
Tue Aug 25, 2020 2:22 am
to specify a color you can use rgb(r,g,b) or rgba(r,g,b,a):
![Untitled.png](./download/file.php?id=47054&sid=71936bcfd6b73f758b97dacb7611012e)
- Untitled.png (86.44 KiB) Viewed 5370 times
I recommend reading the information in the GEGL Graph dialog:
![Untitled1.png](./download/file.php?id=47055&sid=71936bcfd6b73f758b97dacb7611012e)
- Untitled1.png (38.27 KiB) Viewed 5365 times
Kevin
Sun Sep 13, 2020 3:02 pm
A very good solution is presented on the website:
Samj Créationshttps://samjcreations.blogspot.com/2020 ... -tres.html![Image](http://gimpchat.com/files/431_gegl_output.png)
If you want to use gegl_list_all (for me the slashes must be in the opposite direction) this is in the attachment.
@KevinLate thanks for the information provided
Sun Sep 13, 2020 5:27 pm
First tests....
The interesting thing about a plugin is that for it to work, you don't have to enter all its parameters - just the ones you want to change - and the rest are accepted by default.
![Image](http://gimpchat.com/files/431_Test%2001.png)
![Image](http://gimpchat.com/files/431_Test%2002.png)
If You are interested in parameter names and their range, you can find them in * .c files (in the appendix they come from Gegl Version: 0.4.24 - gegl\operations common).
Tue Sep 15, 2020 12:15 pm
I adapted the plug (a bit) to my needs:
Ver.2 - add: 80 operations, open the result as a layer, Preset in Notepad (separate entry in the menu: Filters/GEGL command & preset ...) with a list of operations (and to save by pasting versions of interesting settings).
![Image](http://gimpchat.com/files/431_GCLV2.png)
![Image](http://gimpchat.com/files/431_Operations%20in%20menu.png)
Since the gegl.exe executable (Windows) is available in portable versions of Gimp from
Samj Creation, but not in the official version of gimp.org - it is also included.
Why there are two fields for custom operations - to compare how changing a specific parameter affects the result (and keep the previous setting).
ps.
Samj writes
"Gegl_command_line.py" will likely be replaced by a C filter after Python 2 is abandoned.
Tue Sep 15, 2020 12:33 pm
Is this version callable from a main .py filter?
Does it return the result to the caller?
If yes, could you write a very small example as a guide?
Thanks!
Tue Sep 15, 2020 1:22 pm
Hi Diego.Usage is simple:
- open any RGB photo *;
- run the plugin from the menu: Filters / GEGL command line ...;
- select the type of operation (80 standard +2 non-standard=Custom);
- select ExportType (PNG or JPEG);
- select how to open image (as a new layers or a new image);
- new images processed by Gegl are saved in the bin folder (and overwritten with);
- when you run ( Filters / GEGL & preset.txt command...) a document will open with a list of all operations and a link where you can find additional ones informations;
- in this I also save interesting settings for Custom;
- the record can be pasted into the plugin Command line GEGL (in Custom-1 or Custom-2)
- 80 operation is run without aditional parameters with default values (there are many more operations in the documentation - but require additional parameters).
Tue Sep 15, 2020 1:59 pm
What you detailed is how to use it ONLINE
(2.point "run the plugin from the menu: Filters / GEGL command line ...")
I would like to run one filter written by me and -when a gegl operation is required- write something like
.....
outlayer=pdb.python_fu_gegl_command_line (inImage, inlayer, cmd string)
...
then do whatever next I need using outlayer produced by the gegl command line
Is it possible?
Tue Sep 15, 2020 2:17 pm
I answer to myself:
YES !- Code:
#!/usr/bin/env python
from gimpfu import *
def TestGEGLsamj(inImage, inLayer):
gimp.message ("Hello!")
wrklayer=inLayer.copy()
inImage.add_layer (wrklayer,0)
pdb.python_fu_gegl_command_line (inImage, wrklayer, 2, "blabla", "blabla", 0, 0) # 2= alien map
outlayer = inImage.layers[0]
gimp.message ("Done!")
# ...... do what you like on outlayer
return
register(
"TestGEGLsamj",
"TestGEGLsamj",
"TestGEGLsamj.",
"Diego",
"Diego Nassetti ",
"2020",
"TestGEGLsamj",
"RGB*",
[
(PF_IMAGE, "image", "Input image", None),
(PF_DRAWABLE, "drawable", "Input drawable", None),
],
[
(PF_IMAGE, "outimage", "Output image", None),
],
TestGEGLsamj,
menu="<Image>/Diego/Test",
)
main()
Wed May 19, 2021 12:50 pm
Hello
![Smile :)](./images/smilies/icon_smile.gif)
Here is the paynekj's code converted into a "gegl_command.py" plug-in.
It does not show in any menu, but it enables to code "pdb.python_gegl(theImage, theDrawable, theGeglCommand)".It's tested on Linux but not on Windows.
EDIT:
That's a (near-)duplicate of
gimp-forum.net.
(The file was "fu-python-gegl_ops_test.py". It enabled to code "pdb.gegl_gegl(theDrawable, theGeglCommand)".)Regardless of the duplication, I suggest to keep "gegl_command.py" that is made up of paynekj's simpler version.
(
Sorry, for the mess.)==>
"gegl_command.py" has to be put in the "plug-ins" directory.
Thu May 20, 2021 3:16 am
cli345, thanks again for your nice plug-ins.
I have windows and it works great in neontext.
Thu May 20, 2021 3:38 pm
Thanks instead to paynekj
![Thankful :tyspin](./images/smilies/thankyouspin.gif)
(It isn't my plug-in, I only isolated his code into a file)
Thank you Issabella for your feedback
Tue May 25, 2021 9:41 am
Is there an update of the Gegl-operations-common file posted at #25?
Some operations are missing.
Sorry to ask but I'm unable to find an update by googling, I suppose there is a recent more complete list of the c functions, where to look to see the required parameters.
Thanks.
Tue May 25, 2021 12:54 pm
dinasset wrote:Is there an update of the Gegl-operations-common file posted at #25?
Some operations are missing.
Sorry to ask but I'm unable to find an update by googling, I suppose there is a recent more complete list of the c functions, where to look to see the required parameters.
Thanks.
For what it is worth the GEGL page is back on line.
https://gegl.org/operations/ That takes you to individual functions with descriptions and syntax.
For Windows
![Wink ;)](./images/smilies/icon_wink.gif)
The samj 2.10.24 no longer includes the file gegl.exe but it is there in the zip on post#25 I works in both samj and regular Gimp 2.10.24
It is worth reading the samj GEGL post on this page
https://samjcreations.blogspot.com/2020 ... -tres.htmlExample screenshot for functions listing ( --list-all ) and for an individual operation. ( --info gegl:xxxxx) I make 250 operations.
![gegl.jpg](./download/file.php?id=52259&sid=71936bcfd6b73f758b97dacb7611012e)
- gegl.jpg (161.44 KiB) Viewed 4562 times
Tue May 25, 2021 1:30 pm
Thanks a lot, I will check whether I can find what needed.
In any of my last scripts there are some gegl operations (sometimes I didn't find what I was looking for).
Wed Nov 24, 2021 11:10 pm
Hey guys. A command like
gegl:layer src=/home/contrast/Pictures/LinkedLayers/share.png
is literally the closest thing to having to a shared shared layer system like photoshop
![Image](https://i.imgur.com/fxiNM6C.png)
I made a GEGL Graph preset of it but I was wondering if anyone had a better idea to implement this?
Thu Nov 25, 2021 10:15 am
I would like to show GEGL Graph's ability to live syntax edit text style effects. I wish more Gimp users knew about this as I have been doing this since June 2021 and no longer have to spam multiple drop shadow filters.
https://streamable.com/4p9c1z
Thu Nov 25, 2021 3:21 pm
contrast_,
That was a informative video. Thanks.
Powered by phpBB © phpBB Group.
phpBB Mobile / SEO by Artodia.