The "Meet the GiMP!" ForumGIMP, Image Processing (DIP) and PhotographyImage Processing SoftwareScripts, Plugins, Python, Perl and SchemeAnother way of rotation
Pages: [1]   Go Down
Print
Author Topic: Another way of rotation  (Read 2818 times)
rayadagio
Script Magican in Residence
Lives here ;-)
***
Posts: 363



View Profile WWW
« on: December 17, 2008, 11:03:22 pm »

The GIMP rotation tool is quite good. But I think straightening an image could be done even a little bit easier. I like the way it is done by my former image processing program more than working with the grid of the GIMP rotation tool. So I tried to imitate it by a script.

Usage: place two points on a line or edge of an image element that should be exactly vertical (or horizontal) after rotation. Run the rotation-script. That's all.

The points are easily set by using the path tool: First press "B" to activate the tool, then do single left-clicks (don't hold the mouse key while moving the mouse). After placing the second point a line appears between both points. If you drag the end points (small circles) you can adjust the position of the line.

The script works non-destructively on a copied layer. It uses the sinc-interpolation mode. Sometimes it is recommended to prefer cubic interpolation. I compared both. The results are quite similar. I don't really know, which is better. Have a look at the comparison: www.psyprasoft.de/heisterbach.xcf

On my GIMP I assigned shortcut „ctrl & R“ to this script, so the rotation can be called even quicklier.

Menu location of the script: <image>Image/Transform/Rotation

Regards,
Bert

* rotation.py (2.99 KB - downloaded 289 times.)
« Last Edit: December 19, 2008, 08:40:53 am by ray adagio » Logged

Please feel free to correct my unique usage of the English language! ;-)

www.rayadagio.de

jstavast
Just in
*
Posts: 2


View Profile
« Reply #1 on: December 18, 2008, 04:00:14 am »

Works great.  I am taking daily pictures of a mountain near my home.  I just rest the camera on my porch railing instead of using a tripod, so they are each slightly off from level.  This will help greatly in straightening them to vertical.  I have done it with the grid until now but I think this will make it much easier.

Thanks.
Logged

Rolf
Administrator
Sr. Member
***
Posts: 1327


View Profile
« Reply #2 on: December 18, 2008, 12:29:47 pm »

Really good!

I just changed your Forum Profile a bit. ;-)
Logged

rayadagio
Script Magican in Residence
Lives here ;-)
***
Posts: 363



View Profile WWW
« Reply #3 on: December 18, 2008, 01:39:44 pm »

@ jstavast: Thank you for your feedback! :-)

@ Rolf: *lol*!!!  Grin. Magician-in-training fits better ;-) - there's a cute bug in the code: The script is a little bit too committed in straightening almoast horizontal lines descending from left to right.  Embarrassed This will be fixed within the next few hours ...
« Last Edit: December 19, 2008, 08:42:02 am by ray adagio » Logged

Please feel free to correct my unique usage of the English language! ;-)

www.rayadagio.de

rayadagio
Script Magican in Residence
Lives here ;-)
***
Posts: 363



View Profile WWW
« Reply #4 on: December 18, 2008, 03:36:37 pm »

Fixed!
Download: Top of this thread.
Logged

Please feel free to correct my unique usage of the English language! ;-)

www.rayadagio.de

rayadagio
Script Magican in Residence
Lives here ;-)
***
Posts: 363



View Profile WWW
« Reply #5 on: December 21, 2008, 01:36:04 am »

New version: http://forum.meetthegimp.org/index.php/topic,223.0.html
Logged

Please feel free to correct my unique usage of the English language! ;-)

www.rayadagio.de

Pages: [1]   Go Up
Print
Jump to: