-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Separate alpha and rbg interpolation then recombine to fix issue11316 #12062
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
Conversation
Thanks @dabana Looks promising - I'm surprised this doesn't hit any tests. Since it doesn't, can you make some? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall 👍
Left some comments about making the computation more efficient (both memory and cpu)
Thanks @dabana ! Can you also add a test of this? The example in original issue would be a perfect test image. |
@tacaswell I believe this is ready to merge. |
I don‘t have a complete overview of the topic, but can we save the alpha interpolation if there is no alpha involved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who ever merges this should use squash merge if the duplicate images are not rebased out.
@dabana Sorry this sat for so long. Could you possible resbase / squash this a bit so that we only have one copy of the images you added? |
Sorry @tacaswell I don't think I am getting what you mean. I just synced my fork with the base repo and I rebased this branch with the master. There were no conflicts and I do not see any duplicates of my images in the baseline_image directory. |
@dabana the 8 commits have different versions of the image files in them. If we merge as is, each version of the images will be put in the repo separately, despite the fact the last version is the one we want. |
For how to squash, the somewhat poorly named link here should help: Please do the backup step 😉! https://matplotlib.org/devel/gitwash/development_workflow.html#rewriting-commit-history |
@dabana you missed the I think you want to do
|
9544b38
to
afa6123
Compare
the docs CI is failing because it runs on the branch head instead of simulating the merge and then running the tests so you don't have the fixes from master branch for these docs build issues. |
Is there anything I can do about it to help the merge? |
If you re-base the branch on to current master (and then force-push again) the docs will pass, however I don't think we are going to hold the PR over that. We are just waiting for a second core-dev to review and merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks a lot!
…en recombine to fix issue11316
…062-on-v3.1.x Backport PR #12062 on branch v3.1.x (Separate alpha and rbg interpolation then recombine to fix issue11316)
PR Summary
Addresses issue #11316.
@tacaswell suggested two solutions:
I tested both solutions. Solution 1 did not work. I tested various output arrays but it does not have any impact on the result: grey boundaries are still visible. Finally, solution was the right one. I interpolate the alpha channel and the 3 rgb channels a 2 separate images. I then recombine into a 4-channel RGBA output.
This is a crude fix to the issue. Help wanted to improve elegance and/or efficiency.
PR Checklist