Author Topic: Another way of rotation  (Read 5004 times)

rayadagio

  • Script Magican in Residence
  • Lives here ;-)
  • ***
  • Posts: 540
    • View Profile
    • galery
Another way of rotation
« on: December 17, 2008, 10: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
« Last Edit: December 19, 2008, 07:40:53 am by ray adagio »

jstavast

  • Regular
  • **
  • Posts: 2
    • View Profile
Re: Another way of rotation
« Reply #1 on: December 18, 2008, 03: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.

Rolf

  • Administrator
  • Sr. Member
  • ***
  • Posts: 1805
    • View Profile
Re: Another way of rotation
« Reply #2 on: December 18, 2008, 11:29:47 am »
Really good!

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

rayadagio

  • Script Magican in Residence
  • Lives here ;-)
  • ***
  • Posts: 540
    • View Profile
    • galery
Re: Another way of rotation
« Reply #3 on: December 18, 2008, 12:39:44 pm »
@ jstavast: Thank you for your feedback! :-)

@ Rolf: *lol*!!!  ;D. 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.  :-[ This will be fixed within the next few hours ...
« Last Edit: December 19, 2008, 07:42:02 am by ray adagio »

rayadagio

  • Script Magican in Residence
  • Lives here ;-)
  • ***
  • Posts: 540
    • View Profile
    • galery
Re: Another way of rotation
« Reply #4 on: December 18, 2008, 02:36:37 pm »
Fixed!
Download: Top of this thread.

rayadagio

  • Script Magican in Residence
  • Lives here ;-)
  • ***
  • Posts: 540
    • View Profile
    • galery
Re: Another way of rotation
« Reply #5 on: December 21, 2008, 12:36:04 am »