darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.65k stars 1.13k forks source link

Exported output does not correspond to export settings #8952

Closed daniel-j-h closed 1 year ago

daniel-j-h commented 3 years ago

Hey folks,

I think I just ran into two separate but related issues here with the export settings, when trying to export for a 21cm x 21cm print.

The first one is there's a difference between entering 21,4 and 21.4. It looks like this is related to floating point parsing depending on the user locale? For the user it's confusing and I was wondering what's going on here.

In the following gif, focus on the input sizes in cm and the gray text showing the computed size in pixel.

print-21x21

What's even more confusing is that if I enter 21.4 (dot), close darktable and open it again, the value now shows up as 21,01 (comma, and yes the value shows up as 21,01 and not 21,04 what I expected).

The second issue is that no matter if I use comma or dot, I never get an actual square. Check this out, here are some images exported with 21,4 x 21,4 and 21.4 x 21.4. Neither of them have width == height pixels in their output:

$ file *
DSCF0306.png:    PNG image data, 2528 x 2523, 8-bit/color RGB, non-interlaced
DSCF0306_01.png: PNG image data, 2528 x 2527, 8-bit/color RGB, non-interlaced
DSCF0306_02.png: PNG image data, 2481 x 2476, 8-bit/color RGB, non-interlaced
DSCF0306_03.png: PNG image data, 2481 x 2480, 8-bit/color RGB, non-interlaced

What's going on here? :thinking:

For context: my use case is printing a 21x21cm print @300 DPI with 2mm border at each side (for :scissors:).

daniel-j-h commented 3 years ago

For the record this is with the latest stable Darktable 3.4.1.

magicgoose commented 3 years ago

re. 2nd issue: is the image cropped to square (using "crop and rotate" module)? if not, I guess resizing just isn't allowed to crop or distort aspect ratio. It would normally constrain the largest dimension, and then the other dimension will be smaller, if it's different.

daniel-j-h commented 3 years ago

Yes, I have the crop module set to give me a square crop. That's why not getting a square output is unexpected to me 🤔

On May 30, 2021 8:19:57 AM UTC, magicgoose @.***> wrote:

re. 2nd issue: is the image cropped to square (using "crop and rotate" module)? if not, I guess resizing just isn't allowed to crop or distort aspect ratio. It would normally constrain the largest dimension, and then the other dimension will be smaller, if it's different.

jenshannoschwalm commented 3 years ago

I checked that on todays master and can not reproduce.

Have you checked the exported images in other ways for the dimensions? (Your export settings with "allow upscaling" seem to be fine)

johnny-bit commented 3 years ago

I've checked and while the dot vs comma issue is present, I can't reproduce issue with non-square output with square crop.

daniel-j-h commented 3 years ago

Unfortunately I can not share the picture with you - here are the crop module's settings, in case it heps

crop-module

Have you checked the exported images in other ways for the dimensions? (Your export settings with "allow upscaling" seem to be fine)

I have checked them with the file command line utility, with gimp, and with the gnome image previewer - in all cases the pictures are not squares (width pixels != height pixels).

github-actions[bot] commented 3 years ago

This issue did not get any activity in the past 30 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

jenshannoschwalm commented 1 year ago

@TurboGit can be closed too ...

TurboGit commented 1 year ago

Closed !