Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Panorama Projection
#1
Hi,

I need to script Filters -> Map -> Panorama Projection, but can't find it in the Procedure Browser.
Did I miss something, or is it just not available?

(GIMP 2.10 on Ubuntu 24.04)

TIA
Patrick
Reply
#2
(07-26-2024, 10:42 AM)patrislav Wrote: I need to script Filters -> Map -> Panorama Projection, but can't find it in the Procedure Browser.
Did I miss something, or is it just not available?

It is a GEGL function so does not register in the pdb.

You can see the parameters here:  https://gegl.org/operations/gegl-panoram...ction.html

It is possible to script in python a GEGL function using a utility plugin, gegl_command.py
The plugin with a very simple example is in this recent post.
 https://www.gimp-forum.net/Thread-How-do...n-fu--9136

A possible / probable snag is if you do not have a working python.
This machine i am using is kubuntu 24.04 / Gimp 2.10.38 from a PPA and an appimage launcher from https://github.com/TasMania17/Gimp-Appim...p-v2.10.38 (It is the whole Gimp but I prefer to keep a regular installation.)
...or the flatpak Gimp also provides python2
Reply
#3
Thank you! Do you know if (and how) it's possible to script these GEGL functions from scheme scripts as well?

(I'm way more comfortable in Python than Scheme, but I don't want my script to require an exotic Gimp installation with a obsolete Python version that's EOL since more than four years).
Reply
#4
(07-26-2024, 11:25 AM)patrislav Wrote: Thank you! Do you know if (and how) it's possible to script these GEGL functions from scheme scripts as well?

(I'm way more comfortable in Python than Scheme, but I don't want my script to require an exotic Gimp installation with a obsolete Python version that's EOL since more than four years).

I have not seen a script-fu version. Not to say one does not exist.

see: https://www.gimp-forum.net/Thread-Script...operations

The gimp_gmic_qt plugin now has a whole section of map projections, maybe one of those is equivalent.
Reply
#5
(07-26-2024, 11:34 AM)rich2005 Wrote:
(07-26-2024, 11:25 AM)patrislav Wrote: Thank you! Do you know if (and how) it's possible to script these GEGL functions from scheme scripts as well?

(I'm way more comfortable in Python than Scheme, but I don't want my script to require an exotic Gimp installation with a obsolete Python version that's EOL since more than four years).

I have not seen a script-fu version. Not to say one does not exist.

see: https://www.gimp-forum.net/Thread-Script...operations

It looks like the script-fu approach requires an additional Python plugin as interface towards GEGL (since the Scheme / script-fu API doesn't provide one).
So if I need Python anyway, I rather write the whole thing in Python Wink

Now I installed the 2.99.18 flatpak (to avoid relying on a obsolete Python version) and figure out how to use the plugin API.
Thanks again!
Reply
#6
Quote:....Now I installed the 2.99.18 flatpak (to avoid relying on a obsolete Python version) and figure out how to use the plugin API.....

You need to speak to Ofnuts ...
Reply
#7
ok, the plugin API as such seems to be straightforward - but not the GEGL part of it. I'm supposed to build "chains" from "nodes" and "connect" them in some special way. When I just want to apply a operation to an image. All code examples I can find use "python-fu" but it seems to be deprecated.

Are there some simple examples for just applying a GEGL operation to an image, from a GIMP Python plugin? Using the recent version of GIMP Python API?
Reply
#8
(07-26-2024, 04:35 PM)patrislav Wrote: Are there some simple examples for just applying a GEGL operation to an image, from a GIMP Python plugin? Using the recent version of GIMP Python API?

Ok, found it:
https://gitlab.gnome.org/GNOME/gimp/-/bl...y3.py#L140

This blog post is also helpful:
https://z-uo.medium.com/create-python3-p...ede94e9d1f
Reply
#9
That's GIMP 2.99 stuff !
Won’t work in GIMP 2.10
Reply
#10
(07-27-2024, 01:59 PM)MrsP-from-C Wrote: That's GIMP 2.99 stuff !
Won’t work in GIMP 2.10

Yeah, that's why I looked it up (don't want to use obsolete Python version, and/or obsolete GIMP APIs)
Reply


Forum Jump: