Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selective masking: issue with mask opacity #34947

Closed
mhugo opened this issue Mar 9, 2020 · 0 comments · Fixed by #36697
Closed

Selective masking: issue with mask opacity #34947

mhugo opened this issue Mar 9, 2020 · 0 comments · Fixed by #36697
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@mhugo
Copy link

mhugo commented Mar 9, 2020

Describe the bug

Playing with the opacity of selective masking sometimes give strange results.

Initially reported by @nirvn #33432 (comment) and on Twitter : https://twitter.com/klaskarlsson/status/1231518713804992512

image

image

How to Reproduce

I fail to reproduce the error on my system. But since two people reported it, there might be something ...

QGIS and OS versions

3.12

@mhugo mhugo added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Mar 9, 2020
obrix pushed a commit to obrix/QGIS that referenced this issue May 25, 2020
… masking, the unmasked elements located under the mask are copied into a temporary image buffer and then readded later to the final image.

This copy was done using the masks from selective masking with their full opacity informations. Unmasked informations were thus combined with opacity from the mask leading to the introduction of several artefacts :
* The "phantom lines" qgis#34650 (opacity information introduced by the antialising on mask drawing)
* Opacity applied on non masked surfaces in qgis#34947

To fix this issue a temporary mask is created for the copy of unmasked pixels, in this temporary mask the alpha channel is "binarized" (fully opaque on masking pixel, fully transparent on non masking pixel).

Should fix qgis#34650 and fix qgis#34947
nyalldawson pushed a commit that referenced this issue Jun 7, 2020
… masking, the unmasked elements located under the mask are copied into a temporary image buffer and then readded later to the final image.

This copy was done using the masks from selective masking with their full opacity informations. Unmasked informations were thus combined with opacity from the mask leading to the introduction of several artefacts :
* The "phantom lines" #34650 (opacity information introduced by the antialising on mask drawing)
* Opacity applied on non masked surfaces in #34947

To fix this issue a temporary mask is created for the copy of unmasked pixels, in this temporary mask the alpha channel is "binarized" (fully opaque on masking pixel, fully transparent on non masking pixel).

Should fix #34650 and fix #34947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant