# Free Rotation

Gilles
Caulier

    caulier dot gilles at free.fr

Gerhard
Kulzer

    gerhard at kulzer.net

The digiKam image plugin Free Rotation is a tool for image rotation by any arbitrary angle.

KDE
Digikam

# Introduction

When taking a picture it is all too easy to hold the camera not quite perfectly vertical or horizontal, resulting in a picture where things are tilted at an angle. The way to fix this with the digiKam Image Editor is to use the Free Rotation tool. Select Transform Free Rotation and adjust to the target angle.

## Using the plugin

Rotate your image by using the Angle slider (value in degrees). Press to Reset Values for reset the slider to zero. A rotating effect preview is available on the right side of the dialog. The new target image dimensions in pixels are shown.

For better orientation, the Free Rotation tool provides a vertical and horizontal guide. Move the mouse cursor under image preview to display the dashed line guide. Move the cursor to an supposedly vertical or horizontal feature in the image like the sea or a building border and press the left mouse button for freeze the dashed lines position. Now, adjust the angle accordinly with the guide.

After rorating the image, you often find that things are better but not quite perfect. One solution is to rotate a bit more, but there is a disadvantage to that approach. Each time you rotate an image, because the rotated pixels don't line up precisely with the original pixels, the image inevitably gets blurred a little bit. For a single rotation, the amount of blurring is quite small, but two rotations cause twice as much blurring as one, and there is no reason to blur things more than you have to. Sure, the guide tool available in the Free Rotation preview can help you to apply correctly at the first time an angle adjustment to an image.

## The plugin in action

The Free Rotation dialog tool in action is available below.

### The Free Rotation Tool Dialog

After you have rotated an image, there will be unpleasant triangular "holes" at the corners. One way to fix them is to crop the image with Transform Crop Image Editor menu.

A more elegant way to crop the rotated image is to use the Auto-crop function. Choose anyone of the following options from the combo-box to your preference:

- Widest area This option crops the rotated image to the widest possible (width) rectangular section.

- Largest area This options crops the rotated image to the biggest surface.

Hold the mouse over the combo-box and scroll with the wheel between the two possibilities.

The Anti-aliasing checkbox will smooth the image a bit after rotation. Please read the warning above.