darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Fix cropping when exporting

Open redmoon1945 opened this issue 1 year ago • 3 comments

The "Set size in pixels" in Export does not always produce the expected results. If we set width and height, sometimes none of the specified values will be matched. For example, I have a NEF image of size 8288x5520. If I try to export with “set size in pixel” = 1860x1020, I get an image of size 1531x1019, when the correct result should be 1531x1020. This is annoying when for example you want to export images for HDTV using 100% of the real estate space (meaning either the width or the height must be 100%). Running Flatpak 4.6.1 on Linux Mint 21.3. ImageMagick gives the proper result : convert image.tif -resize 1860x1020 a.jpg the final dimension is 1531 x 1020.

I suggest that this bug be fixed (inspecting ImageMagick resize code could help here). An alternative avenue would be that we add an option in the export Menu, kind of a checkbox "Stick to at least one side" if the bug cannot be fixed.

See discussion : https://discuss.pixls.us/t/bug-with-set-size-in-pixel-for-export/43283/1

redmoon1945 avatar Apr 26 '24 15:04 redmoon1945

  1. There are already some reports here about export size and cropping, are you sure this is different?
  2. The tooltips tell for the size in pixels something like "maximum limit", if you just define the height as 1020 and leave the width at 0 should give exported file always the defined height. Does this give inconsistant sizes?

jenshannoschwalm avatar Apr 27 '24 04:04 jenshannoschwalm

I have tried to leave the width to 1020, but no change, the result is still 1019. I can provide the .NEF if you want, no problem. From what I can see searching the issue, this is not a duplicate. Thx

redmoon1945 avatar Apr 27 '24 04:04 redmoon1945

Can reproduce, depends on provided size - either by crop iop or provided data from raw or after rawprepare tuning.

  1. not sure how to fix ...
  2. basically a duplicate of #16638, it's all the same story and we have had more reports before.

jenshannoschwalm avatar Apr 27 '24 06:04 jenshannoschwalm