Using Processing while Tethering {SOLVED}


Hello All,

First time on the forums, although i’m somewhat familiar with DarkTable. I would like to extend my gratitude for this program, being an avid linux user I love to see programs that make linux more usable/attractive.

That being said i’m dev’ing a project that uses DarkTable to process tethered images. Im running into the issue where I can only change picture setting (iso,exposure compensation, etc) when my tethered pictures are taken. My goal is to adjust more parameters that are available on the darktable tab (shadows,highlights,etc) before they are saved to the hd.

Any help would be kindly appreciated

Solution Found–
I decided to use the Python Image Library (PIL) which interacts directly with ImageMagick. Here is the relevant python code:

#!/usr/bin/env python3
from PIL import Image, ImageEnhance

(Mica) #2

The easiest route would be to make some presets, then auto-apply them.


Can that be done without touching the computer? I.e. this computer will not be accessible physically, So I guess im wondering if preset processing could be done automatically.

Maybe I should look into scripting this

(Tobias) #4

Maybe I should look into scripting this

The Lua scripting in darktable is very limited. You can’t change image parameters with it and you don’t have an event when a photo is shot in tethered mode. Off cause darktable is open source and you can improve it.

Perhaps the best thing is to tell us, what your goal is. The more information we have, the easier is it to help. For me it sounds like a photo box.
Perhaps is interesting for you.

(Glenn Butcher) #5

Coincidentally, I’m messing with the same sort of thing. Right now, I’m setting up a Raspberry Pi to run gphoto2 with something lik the following command:

$ gphotot2 --capture-tethered --keep --hook-script=/home/glenn/ would then do whatever can be done at the command line.

For this use case, you might consider one of the other processing alternatives, like rawtherapee-cli, dcraw/gmic, or dcraw/imagemagick dcraw/graphicsmagick.

(Mica) #6

You’d still need to open the file and export the file, so you’d need to touch the computer.

It sounds like you’re making a photo kiosk, for which darktable might not be the best thing for the job. gphoto2, which darktable and entangle use for tethering, has a command line client. Perhaps that with imagemagick would be an easier solution.


Thank you all for your replies,

I have been going over your suggestions this morning, still researching, but perhaps its best to state my use case.

I have a python script that detects when a new file is put into a folder and sends it SFTP to a server. Before it is sent to a server I would like to adjust Shadows, Highlight, Contrast and Saturation.

I guess a ‘picturebox’ would describe what im attempting.

(Mica) #8

If you don’t need a lot of dynamic processing, you can make an XMP sidecar file and then use darktable-cli to process your image, then upload the resulting image using SFTP.


So after some hours of research this morning, I have figure it out and would like to thank you all for your help in getting me there. I will edit the OP with the solution i found