Skip to content

Oilpaint filter fix

Agata Cacko requested to merge tymond/krita:tiar/oilpaint_filter_fix into master

Changes the way the filter handles opacity. Before it would consider it as normal value to paint, now:

  • it ignores all transparent pixels when calculating the new value
  • if the source pixel was transparent, the result pixel will be transparent, too

Test Plan

  • make a new file with a random image

  • duplicate the layer

  • on one of them, apply the filter

  • on the other, add a filter mask. Paint on the layer while having the mask visible and active.

    • Effect before: artifacts.
    • Effect after: good stroke.
  • Alpha in the image:

    • Source image: Zrzut_ekranu_z_2021-02-24_18-22-42
    • Effect before: Zrzut_ekranu_z_2021-02-24_18-23-09 (notice the downward leaking of the content)
    • Effect after: todo
  • Problem & Question to artists: there are still issues with the oilpaint filter... There is no way to set it up to get the "result" like in unit tests, but it was like that before this MR and Digikam has quite similar effects (with more artifacts since it has black pixels sometimes, too).

    • Krita before: KritaBefore_1_21
    • Digikam: carrot_v1
    • Krita after: todo

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports