Darktable: Unexpected export size after cropping

Created on 9 Oct 2019  路  6Comments  路  Source: darktable-org/darktable

The problem and steps to reproduce
The problem is somehow related to #2849 yet I'm using vanilla darktable from ubuntu repos.

  • I have a picture with WxH of 6011x4022 (or whatever).
  • I want to exported image it to be exactly 6000 by 4000.
  • I crop to exact size I need: 6000 by 4000 (I have to zoom in in a strange manner to see the center and a side I'm moving).
  • Then I export the image limiting width and height with 6000.
  • The resulting image is 5999 by 4000.
    Other results I get are 6001 by 3999 or 6000 by 3999 depending on crop size.
    So I have to use exactly 6006 by 4004 crop to get a 6000x4000 exported image.

Expected behavior
I expect that a cropped to 6000x4000 image would be exported as 6000x4000

Platform (please complete the following information):

  • OS: Ubuntu 18.04.3 LTS
  • Version :
    ```:~$ darktable --version
    this is darktable 2.6.2
    copyright (c) 2009-2019 johannes hanika
    [email protected]

compile options:
bit depth is 64 bit
normal build
SSE2 optimized codepath enabled
OpenMP support enabled
OpenCL support enabled
Lua support enabled, API version 5.0.1
Colord support enabled
gPhoto2 support enabled
GraphicsMagick support enabled
OpenEXR support enabled
```

no-issue-activity

Most helpful comment

Should be fixed already in 3.2

All 6 comments

Does setting "allow upscaling" to "yes" in the export module help? Otherwise, if you're absolutely sure you have a pixel-precise cropping, you could just set the output dimensions to zero, for no scaling. The problem is that darktable's cropping module isn't really designed for pixel-precise adjustment; that type of thing is better handled in a paint-type program like GIMP after exporting.

This issue did not get any activity in the past 30 days and will be closed in 7 days if no update occurs. Please check if the master branch has fixed it since then.

I have the same problem with uncropped pictures in darktable 3.0.1 on NixOS 20.03.
This is independent of whether OpenCL is switched on or off and whether upscaling or HQ resampling is activated.

According to the image information in darktable, each picture has dimensions 3724x2754, while some appear as 3724x2753 in the output. The pictures are RAW (RW2) images from a Lumix DMC-FZ28 with only mandatory filters applied.

@jorsn :

The problem is that darktable's cropping module isn't really designed for pixel-precise adjustment; that type of thing is better handled in a paint-type program like GIMP after exporting.

same whith exporting raw - it's basically a "rounding" problem and if you want exact pixel dimensions it's not darktalbe's job. Additionally you actually get MORE pixels from darktable than form your camera's JPEG (which is max 3648 x 2736 compared to dt's 3724x2754) :)
If you need exact pixel dimmensions, crop in gimp/imagemagick etc.

Should be fixed already in 3.2

Apologies to @jenshannoschwalm and I need to correct myself from earlier: in dt 3.2.1 both exact crop and export with exact dimmensions work pixel perfect!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pphotography picture pphotography  路  3Comments

trougnouf picture trougnouf  路  5Comments

GrahamByrnes picture GrahamByrnes  路  3Comments

lapineige picture lapineige  路  4Comments

Egocentrix picture Egocentrix  路  5Comments