Problem with export dimensions, Darktable

Hello,

I have a problem with Darktable. I have an image which is 6000 x 3376 that I want to export in 4k: 3840 x 2160. I set these dimensions in the export tab and when I export I have a 3838 x 2160 image. Until then no problem my image has not the correct aspect ratio to be 3840 x 2160 so Darktable prioritized a correct height but incorrect width.

To solve the issue above I decided to crop the image with the 16:9 HDTV preset of the crop module. So now I expected that Darktable would be able to export to 4k: 3840 x 2160 which is 16:9. But surprisingly Darktable exports a 3840 x 2159 image which is very annoying. I am sure this is due to a rounding error.

Do you have a solution to this problem?

I am using Darktable 5.0.1 on windows 11.

Thank you

hi,

an idea : you check “allow upscaling” ?
if some pixels need to be create

Hi, I tried but it didn’t work! I tried a lot of settings configurations without success

I also have this same problem! I tried looking through the export module code to see if could find where this rounding was happening but didn’t find it (yet). I was thinking of trying to implement a “use exact dimensions” checkbox that would force the dimensions to be exactly as specified if indeed the current behavior is desirable in some cases

i got 1 pixel lost

Hi! Happy to see I am not alone :slight_smile: Yes it would be great to implement what you are proposing! I think I am going to open an issue on the Darktable Github.

that’s it that is the problem!

I may be wrong but I have seen this issue with many sofwares when we specify a scaling of image to a desired size or format. Sometimes it appears the image just can’t be scaled correctly to that level/ratio and a pixel or two less for one parameter occurs. I presume this doesn’t cause a problem in the end use display if a single pixel is missing from one dimension, but maybe someone more knowledgeable can correct me if I am wrong about this.

I took a look at the code again and might have a found a clue; stay tuned…

1 Like

Hi, I still wish there were a feature on Darktable to fix this issue. It doesn’t seem too hard to fix. It would make the software more professional.

It seems to be the dimension is reported wrongfully while being in scaled darkroom. Will take care (again)

2 Likes

Hello guys, here is the github issue: Problem with export dimensions · Issue #18781 · darktable-org/darktable · GitHub