Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help documentation
#6
(03-21-2022, 10:17 AM)Ofnuts Wrote: The PDF you mention is 15 years old and is meant for Gimp 2.4, so it's a bit obsolete...

As to the two languages:

Script-fu:

Pros:
  • Available in all Gimp versions
  • Does functional programming if that's your fancy
  • Possibly compatible right off the bat with Gimp v3
Cons:
  • Forces functional programming down your throat even if it's not adequate for the problem at hand
  • No isolation between scripts, you can have name clashes with other authors' code
  • Language dates back to the 50's, and misses totally useful features like naming things. For instance you have to remember that the X coordinate if the 6th element of the returned list, and not an item named X.
  • Completely Gimp-centric, you cannot do things that involve Gimp and something else
Python:

Pros:
  • Procedural, object, functional paradigms can be used where they are useful
  • Your scripts (that technically are plugins) run as isolated processes
  • A good deal of the Gimp API is available as objects and methods on these objects, leading to more readable code
  • There is an additional API that gives high-performance access to pixels
  • You can use all of the regular Python runtime libraries, so interact with the rest of the world (read CSV/XML/JSON files, for instance). You can even add libraries (if you don't mind explaining to your users how to add them).
Cons:
  • Not always available in Gimp v2.10 (requires some effort on modern Linux distros,  but Windows/OSX are OK)
  • Code will need some rewrite to run on Gimp v3

Thanks again Ofnuts, I just realised that was the wrong one. The Help file I downloaded said it was for 2.10 and has a date of November 2021: https://gimp.linux.it/www/meta/gimp-help-2.10-en.pdf. All good, though, now that I know what caused the problem. And thank you for the pros and cons of both languages. I'm not necessarily planning on doing a lot of scripting myself (although, now that I know it's possible, who knows?) so I'll just see as I go which language is more useful for my needs.
Reply


Messages In This Thread
Help documentation - by kiwichick - 03-19-2022, 08:43 PM
RE: Help documentation - by Ofnuts - 03-20-2022, 07:48 AM
RE: Help documentation - by kiwichick - 03-20-2022, 08:07 PM
RE: Help documentation - by nelo - 03-20-2022, 08:12 AM
RE: Help documentation - by Ofnuts - 03-21-2022, 10:17 AM
RE: Help documentation - by kiwichick - 03-21-2022, 08:55 PM

Forum Jump: