Oilpaint filter fix
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:
-
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).
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.