Description
Is there an existing issue for this?
- I checked and did not find my issue in the already reported ones
Describe the bug
Thanks to all those that make darktable possible, it's a fantastic piece of software and all your collective efforts are much appreciated.
I think I've found a bug, at least in the new "multi-preset export", if not the standard export dialog also.
When exporting images using the export module from lightable it is not easy to do long unattended batch exports via the darktable GUI when one wants to export multiple sizes of the same image to different directories using the "by scale (for file)" option.
I created three export presets for jpegs for full size (100%), half size (50%) and quarter-size (25%) of my image and each preset size targets its own dir inside the RAW source folder like so:
preset-100 (set size>by scale (for file)>1) output dir: $(FILE_FOLDER)/darktable_exported_100/$(FILE_NAME)
preset-50 (set size>by scale (for file)>0.5) output dir: $(FILE_FOLDER)/darktable_exported_50/$(FILE_NAME)
preset-25 (set size>by scale (for file)>0.25) output dir: $(FILE_FOLDER)/darktable_exported_25/$(FILE_NAME)
I then select the first (preset-100), highlight all the images (e.g. 100+ images) I want to export and press export. The job starts and I can see the images exporting at the correct size into my target $(FILE_FOLDER)/darktable_exported_100
directory (in my case roughly 30-40MB per image), I then move on to starting the 50% export job by loading my preset with scale set to 0.5 (i.e. preset-50 above) and then hit export for the same images as the first batch, note that that preset has it's own explicit sub-directory (i.e. $(FILE_FOLDER)/darktable_exported_50
).
However since the first export for the 100% has not finished yet I notice that all images being written into the $(FILE_FOLDER)/darktable_exported_100
directory are now starting to be written at 50% dimensions and the filesize goes down to around 10MB, I then proceed with the final preset export for images at 25% scale (i.e. preset-25), and I immediately, since the first 100% export has still not finished, see dimensions halved again and file sizes of around 2MB start to write out into the $(FILE_FOLDER)/darktable_exported_100
directory.
I let all three exports finish for each preset and I end up with three directories like this:
$(FILE_FOLDER)/darktable_exported_100 (mixture of 100% images, 50% images and then mostly 25% images)
$(FILE_FOLDER)/darktable_exported_50 (all 25% images)
$(FILE_FOLDER)/darktable_exported_50 (all 25% images)
Basically the scale factor on the last preset I loaded affects all images not yet written to disk.
I understand that the setting in the export dialog say "global options", but I'd really expect an export job to retain the scale I had selected at the point of hitting the export button. Even if this is expected behaviour for the standard export "button" in the export module, I think most would find this confusing.
What is definately not expected behaviour is that this gets carried over to the new "multi-preset export" option in the daily build branch for 5.1. In this instance even the darktable docs use the example of using "multi-preset export" to allow for multiple size exports (see below), but in my tests (on Ubuntu 24.04 Gnome and Windows 11), the behaviour seen above for standard export button remains even when using the multi-preset export. So I still end up with this unexpected mix of files in my final export directories when using multi-preset export button with all three of my presets ticked on. i.e. same again:
$(FILE_FOLDER)/darktable_exported_100 (mixture of 100% images, 50% images and then mostly 25% images)
$(FILE_FOLDER)/darktable_exported_50 (all 25% images)
$(FILE_FOLDER)/darktable_exported_50 (all 25% images)
Since my presets are set to overwrite images in the target directories, I can exactly time when this all happens, by confirming the overwrite warning in the dialog that pops up. If I were to wait for each of the three export jobs to completley finish before hitting confirm overwrite before starting the next export in line then I would get what I expected, i.e:
$(FILE_FOLDER)/darktable_exported_100 (all 100% scale images)
$(FILE_FOLDER)/darktable_exported_50 (all 50% scale images)
$(FILE_FOLDER)/darktable_exported_50 (all 25% scale images)
The current behaviour results in one having to babysit long exports if you want multiple sizes set by the "by scale (for file)" option. For me this meant that instead of going to bed at 1am last night I had to wait until 4.30am as I sat babysitting multiple long exports. So I'm a bit sleepy today :-)
Thanks again to all those that make darktable possible, it would however be great to not have to think about doing all this via cli just to get unattended long exports. Happy to do dome digging if someone can point me in the right direction.
As I mentioned earlier, darktable's own new draft development docs say this about the new "multi-preset export" feature:
multi-preset export
Expanding this section allows you to easily export each of the selected images with several different presets in a single export run. **For example, you may wish to export each image in multiple sizes at the same time"" for use in a website. Simply create a preset for each type of export you wish to make, ensuring that the file path settings for each preset is unique (so that the exported images don’t overwrite one another). Select the desired presets and press the “start export” button as normal.
I think everyone would have the same expectations as me that scale is set by a value saved in the preset and not whatever happens to have been typed into the box in the "global settings" gui at the time that the file is written out to disk.
Above is from: https://docs.darktable.org/usermanual/development/en/module-reference/utility-modules/shared/export/
Steps to reproduce
- Go to Lightable
- Click on Export module,
- Run presets, either standard or with new multi-reset export option
- Get wrong files in wrong directories
Expected behavior
Expect all export options, especially multi-preset export, to encode scale factor and all export variables set and saved via preset at the point of hitting the export button and then not change even if value is changed in the gui of the export module "global settings" menu.
Logfile | Screenshot | Screencast
https://pastebin.com/i5LgvNTe << logs (look normal, for 3 x 12 images exported as 3 seperate jobs all settings the same expect target directory and scale factor)
Se resulting images from 3 x screenshots attached.
<< note files are a mixture of 100% (first file slow to burn out) 50%, then 25%
<< note all these files in the 50% scaled folder are at 25%
<< all files 25%
If whilst any of the above were still exporting, if I were to change the scale value in the gui whislt exports re underway (e.g. to 0.1) all remaining not yet written files would get exported at 10% size no matter what the original preset said.
Commit
No response
Where did you obtain darktable from?
darktable.org / GitHub release
darktable version
5.1.0~git942.4f710556-1+12883.1, also occurs on 5.0.1
What OS are you using?
Linux
What is the version of your OS?
Ubuntu 24.04 Gnome DE
Describe your system
Wayland session into KVM based VM (Ubuntu 24.04.02), but have confirmed that this also happens on a local Windows 11 guest VM. All guests are running on Proxmox 8.4
Are you using OpenCL GPU in darktable?
No
If yes, what is the GPU card and driver?
No on the Linux instance, it's an AMD Epyc based cpu only server, yes on Windows OpenCL running with Nvidia 3060TI, cpu AMD 5700g
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response