FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gtk3cairo draw_image does not respect origin and mishandles alpha · Issue #8798 · matplotlib/matplotlib · GitHub

Repository navigation

gtk3cairo draw_image does not respect origin and mishandles alpha #8798

Closed

Description

As of master (and probably since a long time)

from pylab import *
rcdefaults()
fig, axs = plt.subplots(1, 2)
axs[0].imshow(np.arange(4).reshape((2, 2)))
axs[1].imshow(np.arange(4).reshape((2, 2)), alpha=.5)
show()

produces, on gtk3agg

and on gtk3cairo

Looks like image.origin is not respected, and alpha is not applied correctly (this is not surprising, as cairo uses premultiplied ARGB (https://www.cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t CAIRO_FORMAT_ARGB32).

Activity

  1. added this to the milestone on Jun 25, 2017
  2. AlexanderLarsRobinson commented on Jul 17, 2017

    I'd like to comment that using the imshow argument origin = 'lower' will still flip the image upside-down from origin = 'upper', thus leaving the drawn image consistently inverted relative to Matplotlib's coordinates with this backend.

    This caused me some confusion last week, so I'm glad I'm not the first to notice it.

  3. AlexanderLarsRobinson commented on Jul 18, 2017

    Looking more closely at older issues, the inversion thing seems to be a thing that has come and gone at least once already ...

  4. anntzer commented on Jul 18, 2017

    ContributorAuthor

    I consider the current cairo backend broken beyond repair.
    If you are interested in using cairo, please have a look at https://github.com/anntzer/mpl_cairo, which can fully replace Agg. I would gladly accept any help in getting that backend packageable/ PR'able into the main repo.

  5. modified the milestones: , on Aug 31, 2017
  6. modified the milestones: needs sorting, v3.0 on Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL