The CropAndRotatePlugIn plug-in forms part of the "basic" plug-in group and is used to crop, rotate, flip and do keystone distortion. It can also display various kinds of guides while doing so. It is generally used as part of the Darkroom process of darktable's workflow.

This page is correct for the following stable versions of darktable

Reasons for use

The CropAndRotatePlugIn plug-in is used to manipulate the perspective and crop of your photos. The keystone distortion can correct images of tall buildings to make their edges appear parallel again, like a tilt-shift lens.

What this plug-in actually does

This plug-in affects the displayed pixels of a photograph and can cut away unneeded portions. Also it can distort the pixels, potentially losing some resolution. Keystone always distorts the whole image, regardless of crop.

Parameters that can be changed

The following parameters can be changed within this plug-in and can be found in the right-hand panel of the Darkroom view:

  • flip * angle * keystone h * keystone v * aspect * guides display


Settings are 'horizontal' and 'vertical' flip to reverse the image along the selected axis.


Settings range from -180 to 180 degrees where the negative range rotates the whole image clockwise. Also the image is automatically cropped, so no empty areas are part of the result.
There is a more easy way to align edges in the image to be either horizontal or vertical. Right-click in the image area, and drag a line along an edge to be aligned. Darktable will automatically set the needed angle to make that edge either horizontal or vertical, whichever is closer.

keystone h

Settings range from -1 to 1 where -1 shrinks the left half and where 1 shrinks the right part of the image, while expanding the other half.

keystone v

Settings range from -1 to 1 where -1 shrinks the lower half and where 1 shrinks the upper part of the image, while expanding the other half.


Choose frome various kinds of aspect ratios for your image.

guides display

Various kinds of grids can be displayed as guides to help alignment.

Example usage

Example 1

The CropAndRotatePlugIn plug-in allows you to reduce perspective distortion when shooting tall buildings for example.

You can see how the CropAndRotatePlugIn plug-in makes the walls of the building parallel again. The following photo was taken with a short telephoto 90mm equivalent lens from the ground. It shows a small amount of perspective distortion.

Only a small amount of keystone is needed. I found it easiest to first rotate some edge near the middle of the image, then apply keystone. Repeat again until it is OK.


Some plugins like the graduated neutral density filter [] still use the whole image area regardless of crop.

See also

darktable's online manual

Source code


Also available in: PDF HTML TXT

Go to top