Sign up now! · Forgot password?
RSS/Atom feed Twitter

Scripting in GIMP?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Scripting in GIMP? Supuflounder 04 Aug 08:12
  Scripting in GIMP? Supuflounder 04 Aug 08:18
   Scripting in GIMP? Supuflounder 04 Aug 08:20
    Scripting in GIMP? rich404 04 Aug 10:26
2020-08-04 08:12:05 UTC (about 1 month ago)
postings
4
contact
Send private message

Scripting in GIMP?

We have a fairly sophisticated deep search algorithm. It would be nice to show it working. There is a graphical representation of the problem space. What I would like to do, in effect, is create an "animation"...for example, one that we could show by pasting the images into a PowerPoint presentation, and letting it run as a slide show. The problem is in 3D space. Now, I can figure out how to get 2D XY renderings in orthogonal mode (this transformation is heavily documented), so that is not the problem. What I want to do is emit a set of scripting commands to a file that could be fed into a graphics program, which would draw the images, one after the other, and write each image out. For example, imagine a 3-space rendering:

line 149, 16, 30, 149, 37, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, orange line 130, 16, 30, 149, 16, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, orange line 130, 16, 30, 149, 16, 30, red
next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, red
line 130, 16, 30, 149, 16, 30, red
next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, red
line 130, 37, 30, 130, 16, 30, red
line 130, 16, 30, 149, 16, 30, red
next slide
line 149, 16, 30, 149, 37, 30, red
line 149, 37, 30, 130, 37, 30, red
line 130, 37, 30, 130, 16, 30, red
line 130, 16, 30, 149, 16, 30, red
and the edge detector has identified a rectangle. the orange lines are hypothesized connected edges, and when it connects, it backs out, marking each line as red. When we are done, we have a red rectangle. Next, I would move that red rectangle t o another screen location by adding to the x,y,z values. Then we start showing another edge being recognized. There are some fascinating problems with ambiguities of edges that we would like to see "animated". The goal is to create a script file in the appropriate format for GIMP (the syntax above is illustrative, and will become whatever it needs to become if GIMP has a scripting system that I can use). The operation "next slide" may consist of saving the current file as ANI001.PNG or something like that, creating a blank workspace, and repeating so that at the end I have ANI001..ANInnn for however many slides it takes. I can write a script to make this animation play, but if I could make it play in GIMP that is a bonus!

2020-08-04 08:18:02 UTC (about 1 month ago)
postings
4
contact
Send private message

Scripting in GIMP?

line 149, 16, 30, 149, 37, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, orange line 130, 16, 30, 149, 16, 30, orange next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, orange line 130, 16, 30, 149, 16, 30, red
next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, orange line 130, 37, 30, 130, 16, 30, red
line 130, 16, 30, 149, 16, 30, red
next slide
line 149, 16, 30, 149, 37, 30, orange line 149, 37, 30, 130, 37, 30, red
line 130, 37, 30, 130, 16, 30, red
line 130, 16, 30, 149, 16, 30, red
next slide
line 149, 16, 30, 149, 37, 30, red
line 149, 37, 30, 130, 37, 30, red
line 130, 37, 30, 130, 16, 30, red
line 130, 16, 30, 149, 16, 30, red

All I can say is that the submission system truly mangled my input! I had all those in separate lines. When I see the above, it is correct, but as shown in the posting, it just ran all the lines together for some bizarre reason; let's just say "it doesn't respect boundaries", like a newline. I have no idea if this reply is going to equally mangle its presentation, but at least there are > symbols to show where I wanted the newlines to be. (There also seems to be no way to edit a question once posted).

2020-08-04 08:20:14 UTC (about 1 month ago)
postings
4
contact
Send private message

Scripting in GIMP?

Nope, it mangled the resubmission. Why would it do something like this? Can it be fixed?

2020-08-04 10:26:16 UTC (about 1 month ago)
postings
574
contact
Send private message

Scripting in GIMP?

Nope, it mangled the resubmission. Why would it do something like this? Can it be fixed?

Do not use this "forum" for your sort of question. It is actually a somewhat divorced link to a mailing list. see: http://gimp.1065349.n5.nabble.com/Users-f3.html

If you really want to use it, then subscribe to the mailing list rather than this forum.

Gives text with no formatting. If you need a 'newline' separate the lines with an Enter. Leading spaces vanish.

A better place is one of the more regular forums, I suggest https://www.gimp-forum.net/Forum-Scripting-questions