3
\$\begingroup\$

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 ?

\$\endgroup\$
2
  • \$\begingroup\$ Why do you usually watermark your pictures? \$\endgroup\$ Commented Jan 5, 2021 at 19:35
  • \$\begingroup\$ Watermarking is only an example of the issue I am addressing here. \$\endgroup\$
    – ChrisAga
    Commented Jan 7, 2021 at 8:24

3 Answers 3

1
\$\begingroup\$

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.
\$\endgroup\$
1
\$\begingroup\$

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.
\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks, what you describe is exactly what I wanted to achieve in the first place and it doesn't work. The style works if you apply it "permanently" on the image, not in the export module. I opened and issue and it seems that nobody is working on it. \$\endgroup\$
    – ChrisAga
    Commented Jan 7, 2021 at 8:15
  • \$\begingroup\$ @ChrisAga what version of Darktable are you using? \$\endgroup\$ Commented Jan 8, 2021 at 3:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.