Friday, September 18, 2015

Mouse-assisted image rotation

In the upcoming PhotoFlow version 0.2.1 the scale/rotate tool will acquire a cool new feature: the ability to control the rotation angle with the mouse.

It will now be possible to draw a guide segment on the image, and let photoflow adjust the rotation angle such that the line will become horizontal or vertical (whatever is closer).






In order to create the guide segment, the the scale/rotate first needs to be set in "editing" mode by clicking on the small "pencil" icon above the rotation angle slider:







At this point the segment can be created by clicking twice on the preview area, once for each extremity.
The extremities of an existing segment can also be dragged with the mouse to adjust its position, and the program will take care of automatically updating the rotation angle.

In "editing" mode the preview area shows the non-rotated image along with the guide segment. In order to see the image after rotation one has to exit the editing mode by clicking again on the pencil icon. The guide segment will then be hidden and the rotated image shown:



If the auto crop option is selected, the rotated image will be automatically cropped to the largest area containing only valid pixels and with the same aspect ration as the image before rotation. The auto cropping code has been adapted from Darktable 1.6.8, and therefore behaves in exactly the same way.

For the moment, this new feature is only included in the stable branch of the GitHub repository, but will be soon available as part the upcoming version 0.2.1.

If you are like me, and you never manage to get the horizon straight when you take pictures of the sea, than this is your tool

No comments:

Post a Comment