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
2.x: Cairo backends cannot render images #6562
Comments
Interestingly enough this seems to be a python2 issue only. I can reproduce the error on python 2.7 but not on 3.5 The following reproduces the error without matplotlib try:
import cairocffi as cairo
except:
import cairo
import numpy as np
im = np.random.rand(100,100,4)
cairo.ImageSurface.create_for_data(memoryview(im.flatten()),
cairo.FORMAT_ARGB32,
im.shape[1],
im.shape[0], im.shape[1]*4) |
So a in cairocffi this is fundamentally because |
This stackoverflow question is an example of the same issue http://stackoverflow.com/questions/28984692/ctypes-from-buffer-with-memoryviews-in-python-2-7-and-python-3-4 |
Call cairo.ImageSurface.create_for_data with an array that both py2cairo and cairocffi knows how to get a pointer too and size of
Fixed by #6602. |
In testing #6540, I can see that neither Cairo backend is able to render images correctly.
With GTKCairo:
With GTK3Cairo:
Bisect points to 6595139, the backport of #5718.
The text was updated successfully, but these errors were encountered: