This script lets you to rotate automaticaly your image. You have just to had a vector with the path tool and click on Image/Layer/Auto rotate.
Before : 
After : 
| Attachment | Size |
|---|---|
| after.jpg | 60.06 KB |
| before.jpg | 59.72 KB |
| Auto rotate (old).scm | 2.53 KB |
| working of auto-rotate-script (old).jpg | 43.38 KB |
| Auto rotate (new).scm | 2.97 KB |
| working of auto-rotate-script (new).pdf | 19.08 KB |
Comments
script updated
I have updated my script. This new version can rotate to vertical if the angle (in the direct way) of the vector is in ]-3pi/4 ; -pi/4[ or in ]pi/4 ; 3pi/4[, or in degrees : in ]-135° ; -45°[ or in ]45° ; 135°[.
And now, it's not possible to have this error : "error division by zero".
Thanks for the update!
I've really needed this script for YEARS.
fail
I got a division by zero error. GIMP 2.6.7 on Windows.
Why there is "Error division by zero"
There is this error because the distance between the first point and the end point of the stroke measure 0.
This Usually Means
Probably means that you provided no angle or slant to the path points, therefore it cannot divide by a (zero) angle. Try putting a little bit of angle into the image (look at the images above).
Divide by zero
Whilst I agree with your reason for the error the script should check for division by zero and either do nothing or report a meaningful error to the user (e.g. "Angle of rotation is too small").
Nice and interesting utility
Compliments for the idea to use a vector/path in order to automatically rotate a layer.
Auto Rotate
Alternatively my script both rotates/straightens and crops (when used with the Post Rotate Crop script):
http://registry.gimp.org/node/18821
Great script
Very usefull script. It is very hard to rotate extra large pano by default GIMP tools.
Super!
Hi
what a wonderful script - thats what I need every days before
Thanks a lot
Lieben Gruß
Avarra