<chapter id="freerotation">
<chapterinfo>

<title>Free Rotation</title>

<authorgroup>
    <author>
        <firstname>Gilles</firstname><surname>Caulier</surname>
        <affiliation><address><email>caulier dot gilles at free.fr</email></address></affiliation>
    </author>
    <author>
        <firstname>Gerhard</firstname><surname>Kulzer</surname>
        <affiliation><address><email>gerhard at kulzer.net</email></address></affiliation>
    </author>        
</authorgroup>

<abstract>
<para>
The digiKam image plugin <emphasis>Free Rotation</emphasis> is a tool for image rotation by any arbitrary angle.
</para>
</abstract>

<keywordset>
<keyword>KDE</keyword>
<keyword>Digikam</keyword>
</keywordset>

</chapterinfo>

<title>Introduction</title>

<para>
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
<menuchoice><guimenu>Transform</guimenu>
<guimenuitem>Free Rotation</guimenuitem></menuchoice> and adjust to the target angle. 
</para>

<sect1 id="using-plugin-freerotation">
<title>Using the plugin</title>

<para>
Rotate your image by using the <guilabel>Angle</guilabel> slider (value in degrees). Press to <guilabel>Reset Values</guilabel> 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.
</para>

<para>
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.
</para>

<warning><para>
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.
</para></warning>

</sect1>

<sect1 id="inaction-plugin-freerotation">
<title>The plugin in action</title>

<para>
The Free Rotation dialog tool in action is available below.
</para>

<figure>
    <title>The Free Rotation Tool Dialog</title>
    <graphic srccredit="The Free Rotation Tool Dialog" fileref="freerotationpreview.png"/>
</figure>

<para>
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 <menuchoice><guimenu>Transform</guimenu>
<guimenuitem>Crop</guimenuitem></menuchoice> Image Editor menu. 
</para>

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

<itemizedlist>

  <listitem><para><guilabel>Widest area</guilabel> This option crops the rotated image to the widest possible (width) rectangular section.</para></listitem>
  
  <listitem><para><guilabel>Largest area</guilabel> This options crops the rotated image to the biggest surface.</para></listitem>

</itemizedlist>

<para>Hold the mouse over the combo-box and scroll with the wheel between the two possibilities.</para>

<para>The <guilabel>Anti-aliasing</guilabel> checkbox will smooth the image a bit after rotation. Please read the warning above.
</para>

</sect1>

</chapter>

<!--
Local Variables:
mode: sgml
sgml-omittag: nil
sgml-shorttag: t
End:
-->

