Title: Honouring the alpha attribute when creating composite images. by Westacular · Pull Request #1955 · matplotlib/matplotlib · GitHub
Open Graph Title: Honouring the alpha attribute when creating composite images. by Westacular · Pull Request #1955 · matplotlib/matplotlib
X Title: Honouring the alpha attribute when creating composite images. by Westacular · Pull Request #1955 · matplotlib/matplotlib
Description: I noticed some problems with the drawing of Images onto axes. Specifically, when option_image_nocomposite() is False and a single composite image is created (which seems to be the default for most backends), the alpha attribute of the Image objects was being ignored in the compositing process. I've fixed that by multiplying the alpha component of each pixel with the attribute of the image, if set, during the process of compositing/blending the images together. I've set up a test for this, as well, but getting the correct results from it depends on the changes from #1868. In the process of testing this, I discovered that for output formats other than PNG, the Cairo backend was entirely failing to render images. I fixed that issue, however, a problem still remains: the Cairo image blending algorithms assume that pixel values are premultiplied by their alpha components, which is not currently being done in the process of converting image buffers for use by Cairo. For non-opaque images where rgb values exceed the alpha value, the result can be pretty weird and psychedelic. I can take a crack at fixing this, but it's a more involved change, and given that previously images weren't working at all for Cairo, it's perhaps better saved for a separate pull request.
Open Graph Description: I noticed some problems with the drawing of Images onto axes. Specifically, when option_image_nocomposite() is False and a single composite image is created (which seems to be the default for most ...
X Description: I noticed some problems with the drawing of Images onto axes. Specifically, when option_image_nocomposite() is False and a single composite image is created (which seems to be the default for most ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/1955
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:39f46bd6-34e0-1d55-d424-939db7b19a1b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AA48:238281:4239A5:585A2F:6A52FBE7 |
| html-safe-nonce | 3f6e9bdab08d663bf2d562320d6541fb6916585f86a8e880e5f44509236cdfcd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTQ4OjIzODI4MTo0MjM5QTU6NTg1QTJGOjZBNTJGQkU3IiwidmlzaXRvcl9pZCI6IjUwODk0MjE4NzI1NjQ3MzA4NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ade1a25fcd4aa952eebb79be67e525ee2c744178a35f49f63a80199235286c23 |
| hovercard-subject-tag | pull_request:5410427 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/1955/files |
| twitter:image | https://avatars.githubusercontent.com/u/487498?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/487498?s=400&v=4 |
| og:image:alt | I noticed some problems with the drawing of Images onto axes. Specifically, when option_image_nocomposite() is False and a single composite image is created (which seems to be the default for most ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width