Post Reply 

Automating a Procedure

Jan 28, 2014, 01:15 (This post was last modified: Jan 28, 2014 01:23 by GreenRite.)
Post: #1
Automating a Procedure
Gimp 2.8.6, Windows 7

I have installed the auto_rotate.scm plugin. Now I need to automate a few of the procedures I regularly use it for. After I have selected the Path Tool and marked the two endpoints for the path, I use the following procedure (which is the procedure that needs to be automated):

Select: Windows/Dockable Dialogue/Paths
Right click in the Paths dialogue box
Select: Tools\Rotate by Path\Lanczos\OK
Close the Paths dialogue box

I use this procedure a lot and I could really use for it to be automated. If possible, I'd like the activation to be as simple as pressing a hotkey. If it's a tough project, I'm willing to pay to get it done.

Thanks,
Green
Find all posts by this user
Quote this message in a reply
Jan 28, 2014, 08:53
Post: #2
RE: Automating a Procedure
(Jan 28, 2014 06:54)paynekj Wrote:  It would help if you could tell us exactly where you got auto_rotate.scm from


I was told that this is a python plug-in that rotates about two points, and that there is a link there to the authors site:

http://registry.gimp.org/node/28588
Find all posts by this user
Quote this message in a reply
Jan 28, 2014, 09:35
Post: #3
RE: Automating a Procedure
@paynejk

The auto-rotate is an old-ish script that does not work on the OP's installation.

see: http://gimpforums.com/thread-crop-scale-...4#pid19964

the referenced plug-in ROT2.py is in there as well.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jan 28, 2014, 10:03 (This post was last modified: Jan 28, 2014 10:05 by GreenRite.)
Post: #4
RE: Automating a Procedure
Now that rich2005 has refreshed my memory (and thank you), I do believe it is rot2.py, but how can I find out which one it is for certain? Thanks!
Find all posts by this user
Quote this message in a reply
Jan 28, 2014, 10:41
Post: #5
RE: Automating a Procedure
In Gimp use Help menu -> Plugin Browser and enter rotate in the search box.

It will tell you which plugins are working and where they are in the menu structure.

A bit like this, although I possibly have more entries than you.

http://i.imgur.com/ZFLflt3.jpg

Since auto-rotate.scm does not work on your installation everything points to ROT2.py

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jan 28, 2014, 12:03
Post: #6
RE: Automating a Procedure
I do have the one titled py-split-rot, author jfgarcia.
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 04:45 (This post was last modified: Jan 30, 2014 06:14 by GreenRite.)
Post: #7
RE: Automating a Procedure
(Jan 28, 2014 09:47)paynekj Wrote:  So which is being used: auto_rotate.scm or rot2.py ?

Either way it's going to need someone to either modify the existing script, or write a new script to call the original and bypass the dialog.

Kevin

Is there anyone out there who can do this for me? I really could use help getting this done, and as I said in my first post, I can pay you for your work.

The project is automating key strokes and/or mouse clicks for a GIMP (2.8.6, Windows 7) procedure that I use frequently. The procedure involves using the already installed plugin rot2.py, which can be found here:

http://registry.gimp.org/node/28588

After an image has been opened (usually .jpg, but sometimes .bmp) and a path has been defined by its two endpoints, this is the procedure that follows, and that needs to be automated:

Select: Windows/Dockable Dialogue/Paths
Right click in the Paths dialogue box
Select: Tools\Rotate by Path\Lanczos\OK
Close the Paths dialogue box

I'd like something as simple as pressing a hot key (or combination of keys) to run the automated procedure.

Is anyone willing to give this a shot?

I really need to get this done, because I have a BIG project I'm using it for.

It would be VERY much appreciated.

Thanks,
GreenRite at yahoo dot com
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 09:10
Post: #8
RE: Automating a Procedure
This is a bit strange, I went back to look at auto-rotate.scm in a Win7 64 bit (virtual machine) to see if I could find the error, and it is now working (at least it was 5 minutes ago)

Looking at the date of the other post, 19 July I would have been using a 2.8.6 (as yourself).

Now updated to Gimp 2.8.10 and the script works. If you have not already updated your version of Gimp might be worth doing this and trying that script again.

If you look at the gimp.org download listing

ftp://ftp.gimp.org/pub/gimp/v2.8/windows/ you see that Gimp 2.8.6 is not listed, probably due to bugs.

The auto-rotate.scm would speed up your work flow since it is one click. The zip file is still there on that earlier page.

http://gimpforums.com/thread-crop-scale-...4#pid19964

Also, plea to any Win7 64 bit user, give this a try, maybe confirm works/not working.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 09:52
Post: #9
RE: Automating a Procedure
(Jan 30, 2014 09:39)paynekj Wrote:  
(Jan 30, 2014 09:10)rich2005 Wrote:  This is a bit strange, I went back to look at auto-rotate.scm in a Win7 64 bit (virtual machine) to see if I could find the error, and it is now working (at least it was 5 minutes ago)

Also, plea to any Win7 64 bit user, give this a try, maybe confirm works/not working.

It works for me (Win 7 GIMP 2.8.2), although I was concerned that when I open it in a text editor it complains about non code page 1252 (ANSI - Latin 1) characters and that's usually a red-flag for script-fu.

Kevin

there is a comment in French,
nous donnons à a une nouvelle valeur arbitraire tel que a soit un réel non nul. b=0 pour que b/a = 0

could the accents be the cause?

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 10:46
Post: #10
RE: Automating a Procedure
There are a few strange characters that show up more in Win than in my usual linux.

screenshot http://i.imgur.com/WrKMUb1.jpg strange that a comment could affect the action of the script, but there was a similar report recently on GC.

Anyway I deleted these in my Win7 VM and it works, but then it did before that.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 11:58
Post: #11
RE: Automating a Procedure
I've updated my GIMP version, and now auto-rotate.scm is working fine. Thanks, that will be a BIG help.

I see that auto_rotate.scm has different behavior than did ROT2.py. ROT2.py always rotates the image such that the endpoints of the path are horizontal, which is the exact behavior that I needed.

However, in auto_rotate.scm if the slope of the path is downsloping or upsloping less than 45 degrees, the enpoints are rotated to the horizontal, but if the slope is more than 45 degrees, then auto_rotate.scm rotates the image such that the endpoints are vertical.

I think I might encounter a slope greater than 45 degrees maybe 10% of the time. Is this something that you could modify in the code of auto_rotate.scm?

If not, that's cool. . . auto_rotate.scm will be a tremendous time saver in this project.

Green
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 11:58
Post: #12
RE: Automating a Procedure
I've updated my GIMP version, and now auto-rotate.scm is working fine. Thanks, that will be a BIG help.

I see that auto_rotate.scm has different behavior than did ROT2.py. ROT2.py always rotates the image such that the endpoints of the path are horizontal, which is the exact behavior that I needed.

However, in auto_rotate.scm if the slope of the path is downsloping or upsloping less than 45 degrees, the enpoints are rotated to the horizontal, but if the slope is more than 45 degrees, then auto_rotate.scm rotates the image such that the endpoints are vertical.

I think I might encounter a slope greater than 45 degrees maybe 10% of the time. Is this something that you could modify in the code of auto_rotate.scm?

If not, that's cool. . . auto_rotate.scm will be a tremendous time saver in this project.

Green
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 12:00
Post: #13
RE: Automating a Procedure
Hmmm, I only hit the post reply button once, I wonder why it posted twice?
Find all posts by this user
Quote this message in a reply
Jan 30, 2014, 14:38
Post: #14
RE: Automating a Procedure
(Jan 30, 2014 11:58)GreenRite Wrote:  --snip--
I think I might encounter a slope greater than 45 degrees maybe 10% of the time. Is this something that you could modify in the code of auto_rotate.scm?


The mark 1 version of the script acts the way you want. Pulled it out of my archive.

.zip  Auto-rotate-1.scm.zip (Size: 874 bytes / Downloads: 32)
Remember to unzip it before putting in your scripts folder and remove the old one.
Thanks go to the author Hevan. I did a small edit and it now appears in the image menu bar next to 'Help'. Double click to apply.
Might speed up your processing.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jan 31, 2014, 01:33 (This post was last modified: Jan 31, 2014 11:34 by GreenRite.)
Post: #15
RE: Automating a Procedure
Gimp 2.8.10, Windows 7, 64 bit.

Thanks to Hevan for having authored this script and thanks to rich2005 for having provided it from his archive and having customized it for me, and thanks to all the others who have consulted on this project. This script will save me a lot of time.

There is one other lengthy routine that I follow exactly every time I edit an image, and I'm wondering if there might be a script written for that as well. When I am done cropping the photo, these are the steps I follow:

Click: File
Click: Export As
Click: Local Disk D:
Double Click Folder Icon: DONE
Click: Export
Click: Export
Click: File
Click: Close View
Click: Discard Changes
Click: File
Click: Open

And, like with auto-rotate-1.scm, having a button on the top bar to click to execute the script would be just fabulous.

Can you provide a link to a script that will do something similar? Again, any help is GREATLY appreciated.

Green
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
Question miss the procedure how to ... Sebastian 1 153 Jan 27, 2018 16:41
Last Post: ythgilb
  Automating a bunch of quiz cards sponsen 2 747 Jan 9, 2013 00:34
Last Post: BilboMint

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS