After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 526719 - add easy way to set rotation angle to straighten an image
add easy way to set rotation angle to straighten an image
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal enhancement
: 2.10
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-04-07 14:04 UTC by Dori
Modified: 2018-05-24 12:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
poc: rotate active layer from measure tool options dialog (5.65 KB, patch)
2017-12-27 11:41 UTC, Massimo
none Details | Review
poc: rotate active layer from measure tool options dialog (6.42 KB, patch)
2017-12-28 16:04 UTC, Massimo
none Details | Review

Description Dori 2008-04-07 14:04:54 UTC
In my photography workflow, when I want to straighten an image, I first use the ruler to get a measure of degrees and then I use rotate. It would be really helpful if there was a tie in between these tools. For example, you could autofill in the degrees (with the right sign) to align either horizontally or vertically (depending on the ruler position) the image. I believe Photoshop does this.

You could also have a button in the Info Window of the ruler that says "Auto-straighten" to this line (again either horizontally or vertically, doing the right clockwise/counterclockwise rotation depending on the position of the ruler).

Thanks
Comment 1 Sven Neumann 2008-04-07 18:56:55 UTC
Just use the Rotate tool in Corrective mode and align the grid with your image.
Comment 2 Dori 2008-04-07 19:53:52 UTC
That doesn't really help with fine adjustments. The grid lines often don't fall right where I need to measure the straightness. If I increase the number of grid lines to where one gets close the image is cluttered with lines and I can't see (not to mention that they flicker like crazy). Maybe the way to do it is to have movable grid lines so you can place them where you need them. Could that be an enhancement?
Comment 3 Sven Neumann 2008-04-10 08:05:19 UTC
Even though this has been suggested before (most probably because PS does it this way), this sounds like a terrible kludge to me. I would prefer a real solution. One that is discoverable from the Rotate tool and doesn't depend on some weird interaction between tools that are otherwise unrelated.

I am willing to keep this report open if we can find a better solution. A discussion on the mailing-list might help with this...
Comment 4 Dori 2008-04-10 13:04:45 UTC
There are many ways to do this. The basic idea is that you have a ruler. So from the rotate tool you could have a checkbox to display a straightening ruler. A single line shows up on the layer and you can move, rotate, and resize the line. As you rotate the line, the degrees get filled in, and you can apply the rotation when you're ready. Similar to the grid, but a single line that can be moved and resized. This would work very well for fine adjustements.
Comment 5 DF 2017-03-27 19:37:18 UTC
Yes, the rotation tool needs improvement. Currently when rotating, there is nothing to reference against such as straight lines. Shotwell, for example, lays out a square grid so you can adjust the image until the horizon for example is parallel with the grid. Right now I am guessing a number, trying it, putting something straight up to it to check it, undo, try again. And what's the point of the grid rotating with the image? I find it's pretty dense and obscures the image.

I like the idea of being able to draw lines and move them around for referencing against. The problem with the grid in shotwell is sometimes it's not in the ideal location.

So maybe there should be a few options in the rotation dialog for turning on/off static and rotating grids and maybe allow dragging the grid around.

I also really like the idea of drawing a line on the image and setting what angle it should be. So for example drawing a line across the horizon and setting that to 0° and it will rotate accordingly.
Comment 6 DF 2017-03-27 20:06:22 UTC
Came across bug 90287 which answers a few of my problems. I didn't realize there were options outside the rotation tool dialog. Maybe that dialog should just be incorporated into the tool options to keep everything together.

Just for reference:
bug 702751 was about not allowing grid to rotate.
bug 162877 was about making image straightening more streamlined.
Comment 7 Massimo 2017-12-27 11:41:26 UTC
Created attachment 366008 [details] [review]
poc: rotate active layer from measure tool options dialog

Attaching a POC patch following the second suggestion in Description.

It adds a button to measure tool options dockable to automatically rotate
the active layer so that measure tool drawn line becomes horizontal
and oriented like the x axis. It also resize the canvas to the new layer
size, but obviously the details can be adjusted.

Kludge or not, the problem is that the rotate tool is still hard to use
and the idea to use the grid as the reference element for aligning in 
corrective mode is even more hard to discover/understand today
Comment 8 Michael Natterer 2017-12-27 12:04:40 UTC
That looks interesting, and much better than the often-heard proposal
to simply automatically take over the measure angle into the rotate
tool.

The patch isn't complete however, for example it never disconnects from
the button's signal, but then it's labeled "poc" :)

Optimistically setting 2.10 milestone, this is local and simple
enough to be considered.
Comment 9 Massimo 2017-12-28 16:04:18 UTC
Created attachment 366048 [details] [review]
poc: rotate active layer from measure tool options dialog

Right, I thought calling signal_connect_object would have been enough,
but the problem is that the signal could be connected/emitted
multiple times.
Comment 10 GNOME Infrastructure Team 2018-05-24 12:21:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/271.