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: phantom lines on dark background #34650

Closed
mhugo opened this issue Feb 25, 2020 · 0 comments · Fixed by #36697
Closed

Selective masking: phantom lines on dark background #34650

mhugo opened this issue Feb 25, 2020 · 0 comments · Fixed by #36697
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers

Comments

@mhugo
Copy link

mhugo commented Feb 25, 2020

Describe the bug

Selective masking generates lines or "halos" around the masked area. They are visible on dark backgrounds.

Some examples:

image

image

image

When turning off anti-aliasing, the problem disappears, but this is not a solution.
Something is wrong in the way images are composed and leads to this rendering artifacts

@mhugo mhugo added Symbology Related to vector layer symbology or renderers Bug Either a bug report, or a bug fix. Let's hope for the latter! labels Feb 25, 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! Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant