Correct horizon
A script-fu for The Gimp
Example
Image 1: Using the rectangular selection tool, we define 2 points on the slanted line.
Image 2: Correction executed
|
|
|
Description
"Correct horizon" is a script-fu for the Gimp.
It is an enhanced version of the script "Crop rotated photos". "Correct horizon" also performs the rotation needed to correct a slanted horizon or even a slanted vertical axis. There is no more need to guess by which angle you must rotate your photo. Just define two points on the line that should be horizontal or vertical and run the script.
For more details, read the
tutorial with examples.
The script has been tested with The Gimp version 2.2.9 on Linux SuSE and with The Gimp version 2.2.10 on Windoze.
The script version 1.10 has been tested with The Gimp version 2.4.0 on Linux Ubuntu 7.10 Gutsy Gibbon.
The script version 1.13 has been tested with The Gimp version 2.6.8 on Linux Ubuntu 10.04 Lucid Lynx.
Versions
2011.07.10 : The current version is 1.13. It has been tested with Gimp 2.6.8. Manual angle and anti-clock rotation did not worrk any more lately. Problem corrected.
2007.10.24 : The version 1.10 has been adapted to The Gimp 2.4.
Download:
Click into the blue frame below where the script is listed.
Type
Control-A to select the complete text of the script.
Type
Control-C to copy the script to the clipboard.
Go to your text editor (gedit, Kate, Aedix, Notepad, etc) and type
Control-V to paste the script.
Save it as a file named
correct-horizon.scm
Linux Ubuntu or other Gnome: use the text editor gedit or bluefish
Linux Kubuntu or other KDE: use the text editor Kate or Quanta
Mac OS X: use the text editor Smultron
Windoze:
use the text editor Aedix (free), or Notepad (but beware of the file extension .txt which is unwanted, the script file must have the extension .scm and not .scm.txt)
Other text editors are ok too, but word processors are not. Do not use Word, OpenOffice or similar tools.
Installation:
Copy
correct-horizon.scm into one of the directories registered in the Gimp preferences under Folders/Scripts.
Linux Ubuntu and many others:
/home/[username]/.gimp-2.n/scripts or
/usr/share/gimp/2.0/scripts
Linux SuSE:
/home/[username]/.gimp-2.n/scripts or
/opt/gnome/share/gimp/2.0/scripts
Windoze:
C:\.gimp-2.n\scripts or
C:\program-files\gimp2.n\share\gimp\scripts
Then go to the menu Xtns (in The Gimp) and select
Xtns / Script-Fu / Refresh Scripts. That's it.
The script can be called in the menu
Layer / Transform / Correct Horizon...
Script-fu correct-horizon.scm for The Gimp (english version)
Sponsorship
If you find the script 'Correct horizon' useful and want to support the developer, you can
License
The
GNU general public license applies to the script-fu
correct-horizon.scm above and to the various language versions of the script.