exporting to multiple formats

Hi, I have a question: is there a way to export one a raw/photo to several different formats at once, with one or two clicks? I find it annoying that I always have to change the export settings in the export module if I want to e.g. export a photo to jpg/saled down/srgb and jpg/full size/large color space.
Maybe with the command line options of darktable? Or maybe it’s possible to create a lua script or something like that?
I have chosen the darktable category, but I am also interested if other software can do this.

Thanks in advance

Anna

never mind. I have just seen that it’s possible to create presets for that module, so that’s 3 clicks.

1 Like

The one problem with the presets is that it will not include the scaling factor. This is something I would like to see, but I seem to be alone on this idea.

1 Like

It could be done with a lua script. You basically write your own exporter, but it’s not difficult to do and there are examples.

1 Like

Although that reprocesses the whole thing. it would be nice to get a multi-export feature, where only the resize (and few things that happen after resize) are re-done for each output resolution.

1 Like

How would I start to write such a script?

Probably there is a good technical reason for resize missing from export presets.
But, the proper thing would be to integrate resize to the export presets, not an extra lua script or so, although a lua script would be better than nothing for the time being.

Another way might be a simple shell script that uses imagemagick or so or a python script that is called up with a shortcut - but kind of outside of darktable? Even darktable cli might be used for that? But the tricky thing might be to select the photos in a gui, such as darktable or a file manager?

I do have several resizing presets, all using resolution, not ratio (scaling factor). For example:
image

2 Likes

yes, it works, resizing is only broken when you choose ratio.

Perhaps the scaling factor doesn’t get included. I know that pixel sizes are stored in the export presets.

If you look at the official/enfuse.lua script in the lua-scripts you can see how it’s done. Look for the tiff_exporter lines.

1 Like

Thanks @kofa your suggestion of setting pixel size works fine and will suit my needs in the future which I use when I post images to the playraw category. BTW, what size images do others find best to post for playraw to show editing attempts?

For now pixel size will suit my needs, but I wonder why ratio doesn’t work.

@paperdigits covered this a little while back:

+1. Generally, places you may want to use an image care about the size of the file you provide, not what per cent of the original it is.

It is the only option where the output size depends on the size of the input. So perhaps the devs thought it a bad idea to store it in a preset?

Thanks for the advice. How much compression do you recommend as this preset is really just for the forum.

I’ll leave that to @paperdigits to answer…I was quoting him, and don’t want to put words in his mouth!

Well the ones i post here are mostly landscape orientation and so I am posting with 1920 ie my native monitor resolution and 80% quality… so if they have been acceptable …in the end we usually have the raw and the xmp if we are lucky so the posted jpg is really just a preview… at least that is how I see it unless I guess you are exploring export artifacts or something…

I usually use 85 for jpeg compression. Makes a nice small file size but doesn’t seem to introduce a lot of artifacts.

But somewhere below 90 is probably good.

We are trying to store all the forum data as long as possible, and we have to pay per GB for storage. So we don’t really want 30MB jpegs unless there is a good reason.

We don’t really police this, just bring it up occasionally when we see a slew of large jpegs (or when prompted :wink: ).

2 Likes