darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Masks are lost when used in styles

Open marc-fouquet opened this issue 1 year ago • 6 comments

Describe the bug

When a module in a style has a mask, this mask is not correctly re-applied with the style.

Steps to reproduce

  • Start with a freshly reset image.
  • Add a circle mask to the exposure module.
  • Increase the exposure. This only affects the masked area.
  • Create a style using the "3 circles" icon just right of the button "compress history stack". Include the exposure module.
  • Reset the image history.
  • Apply the style.

Result: The exposure module shows a mask-symbol, but the mask is fully opaque, so the exposure change is applied to the whole image.

Expected behavior

Darktable should apply the change only in the masked area.

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

self compiled

darktable version

4.8.1, 8ded880839-dirty

What OS are you using?

Linux

What is the version of your OS?

Debian Bookworm

Describe your system?

I tested this on

  • 4.8.1 from scoop on Windows 10
  • 4.8.1 from Flathub on Debian Bookworm
  • Current git 8ded880839-dirty on Debian Bookworm

Are you using OpenCL GPU in darktable?

No

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

marc-fouquet avatar Sep 08 '24 18:09 marc-fouquet

I'm not sure drawn masks have ever been included in styles. Parametric masks do get included, I have several styles which make use of them.

ralfbrown avatar Sep 08 '24 18:09 ralfbrown

Well there is a mask-symbol besides the module (in the "mask column") when I create the style and there actually is a (broken) mask when I apply it. This is why I expect that the mask is stored with the style.

marc-fouquet avatar Sep 08 '24 18:09 marc-fouquet

Yes, the parametric mask's values are stored in the style. Which, if you've only added drawn shapes, would select all of the pixels. As I said, I don't think drawn shapes have ever been included in styles (that's rather more complicated than the fixed set of parameters).

ralfbrown avatar Sep 08 '24 19:09 ralfbrown

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Nov 08 '24 00:11 github-actions[bot]

I plan to look at implementing this in the Spring. It appears that a reference to the shapes is stored in the style as part of the blendop parameters, because I've discovered that the shape does get applied by the style if it exists in the mask manager for the image (even if not currently used by any module).

ralfbrown avatar Dec 16 '24 07:12 ralfbrown

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Feb 15 '25 00:02 github-actions[bot]

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Aug 20 '25 00:08 github-actions[bot]

Still planning to work on it, but... life. I did manage to look into it a bit over the summer and have a reasonably good idea of what I need to do to get it working.

ralfbrown avatar Aug 20 '25 01:08 ralfbrown

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Oct 20 '25 00:10 github-actions[bot]