I am trying Darktable for raw processing, and I want to crop an image to an exact size (e.g., 1280x720), specifying the content to retain by moving the rectangle around after it's sized. This is pretty standard in most programs I've used (the X,Y+X+Y is usually listed with regular number inputs), but the only thing I can find in Darktable is an aspect ratio, which will helpfully lock the selection to 16:9 but not let me select a specific size.

Is there any way to input an exact size for a crop in Darktable?

  • To clarify: are you asking for something less fiddly than dragging the rectangle to resize it with the problems that the background might not have enough contrast to read the size and that you need to zoom in a lot to have fine enough control? Or are you asking how to ensure that the exported JPEG is the size shown in the crop rather than sometimes being one pixel smaller? Dec 17 '18 at 11:37
  • @PeterTaylor The latter is primary, the former also a concern, especially since GTK3 has more display bugs than an entomology lab. Dec 18 '18 at 0:48

Yes you can crop to an exact size by dragging the sizing around manually and eventually get it right on what you need but doing it repeatedly soon gets annoying.

To "input an exact size" I had to set up that particular size first.

I have a size I want to use often, so after manually getting the sizing correct, I saved this size as a pre-set in the crop and rotate tool. I can now apply it to any selected image which crops automatically but then turn the tool off then on again brings it back as a selected area, then I can move the selection around the image to choose which area is retained before using doubleclick to set it.

Preset example at right of tool heading


Yes, you can crop to exact size in Darktable!

Using Crop & Rotate tool, which I guess you were already using, change aspect setting from 16:9 to freehand.

enter image description here

After you have done that you can change the aspect that you want (or size) by dragging the selection bar, which appears when mouse over the edge of picture.

enter image description here

I'm aware that it is a bit fiddly to change crop to a right size, but it should be possible to do.

enter image description here

Hope this helps!


I'm using DarkTable 3.2.1 and it is possible to enter any custom ratio you would like in the darkroom > crop and rotate module. It's not obvious. Start by selecting the "aspect" attribute so that the drop down list appears of the pre-chosen aspect ratios. While the list is open just start typing on your keyboard "9:7" for example. Hit "enter" and you now have your desired aspect ration applied to your image. enter image description here

With your ratio applied go to the Lighttable > Export selected module to enter the "max size" under global options to resize your image when exported. In this example I have a portrait image so just entered 1400 pixels for one edge. If you have a Landscape image you would enter 1400 in the first "max size" box and leave the second box empty. Entering one value stops the image from being distorted. enter image description here


You should use combination of crop and export.

First you should define the exact crop ratio (Crop & Rotate tool). Resize and move (the crop) to the desired view.

Then select File on Disk as the Target Storage or click the folder icon to choose where to save the image. In file output size write one of the dimensions of desired size and click Export.

For more details you can check this document.

  • 1
    Cropping only to a geometrically congruent region and then resizing means that the image will usually be rescaled. My goal was to avoid rescaling if I could capture an exact region. Dec 17 '18 at 9:15
  • @chrylis, I am afraid you should use different tools for such task. Dec 17 '18 at 9:21

YES is the answer to the original question. You just set the crop size you want on one picture then make it a preset. (Use the three bar hamburger menu to set a preset.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.