TransWikia.com

Darktable : using a style to deactivate an operation when exporting a file

Photography Asked by ChrisAga on April 12, 2021

I usually set a watermark on my photos and I would like to be able to deactivate sometimes the watermark when I am exporting files from the light table.

Long ago, with an old version of Darktable, I used to achieve that with a style but it doesn’t work anymore.

I tried to recreate the style, and export it. I formatted it with xmlstarlet just to read it :

<?xml version="1.0" encoding="UTF-8"?>
<darktable_style version="1.0">
  <info>
    <name>Sans Filigrane</name>
    <description/>
  </info>
  <style>
    <plugin>
      <num>9</num>
      <module>5</module>
      <operation>watermark</operation>
      <op_params>gz10eJxjYFjgxMCwwJHh+mKbBqHm3RwMEMAIxOWJJalFuYlF2fFFmekZJcV6xWXpDKNgFJABXFKzEsNKFYIT84oVDA1I1w8Ao1QSBA==</op_params>
      <enabled>1</enabled>
      <blendop_params>gz11eJxjYGBgkGAAgRNODGiAEV0AJ2iwh+CRyscOAAdeGQQ=</blendop_params>
      <blendop_version>9</blendop_version>
      <multi_priority>0</multi_priority>
      <multi_name/>
      <iop_order>76,000000</iop_order>
    </plugin>
  </style>
</darktable_style>

I tried to replace <enabled>1</enabled> by <enabled>0</enabled> in the original file and managed to re-import it but it misbehaved exactly the same.

I searched deeper in the Darktable documentation and found that styles are applied like duplicates instances of the modules on top of the history stack. I suspect that deactivating a module at export time couldn’t be achieved by applying a style.

Maybe somebody would have a solution ?

3 Answers

My best shot for this particular use case is to create a style which enables the watermark and configure my export presets to use it.
I just deactivate it when needed.

I see 2 drawbacks :

  1. If I configure the watermark in the darkroom, I must not forget to deactivate the watermark module,
  2. The style apply its own recorded presets and resets any watermark settings I would have manually set.
  3. This logic may not suit every use cases.

Answered by ChrisAga on April 12, 2021

I actually have another solution which is may preferred for now. I use a style which disables the watermark and apply it in append mode on every photo just before exporting them. Then I undo the style by hitting Ctrl+Z.

Pros :

  • It lets do whatever you want with your watermarks

Cons :

  1. You must not forget to hit Ctrl+Z just after exporting while your photos still are selected on the lighttable.
  2. There is a GUI bug in Darktable v.3.2 providing a thumbnail of the original image (freshly imported) on the lighttable when you hit Ctrl+Z. The right thumbnail is regenerated as soon as you open your photo in the darkroom. I reported the bug and it's corrected in 3.4 release (Christmas 2020). There is still a bug when multiples instances of modules are used in the development pipeline.

Answered by ChrisAga on April 12, 2021

One way to solve this is to create a style that turns the watermark off. In Darktable 3.4 (current version), this can be done by:

  1. Selecting an image with a watermark.
  2. In the Darkroom, turn the watermark module off.
  3. In the Darkroom, press the style creation button in the History Stack module.
  4. In the style creation dialog, select only the Watermark module (it should indicate it has been turned off).
  5. Name the style "watermark off" or something similar and save the style.
  6. On the Lightable, navigate to the Export module.
  7. Select the Style dropdown in the Export module.
  8. Select the "watermark off" style (or whatever you called it if different).
  9. Export the image (for convienence, you might want to create a preset for this in the Export module).

I think, that if you find yourself editing XML in relation to Darktable, you might be off track and it is often easier just to recreate the desired behavior from scratch, particularly if it is a relatively simple behavior.

Answered by Bob Macaroni McStevens on April 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP