-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Interoperability issue with pycairo for ImageSurface.create_for_data and numpy data #223
Comments
Hi! Thanks for the report. Instead of trying to find wrong data lengths and stride values, we should rely on Cairo. Removing the condition is not enough, as we want to raise an error if anything goes wrong. The "right" way to do this would be to detect when Interested in opening a pull request? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am currently trying to understand why my code works with pycairo, but fails for cairocffi.
Let's take the script at https://github.com/FriedrichFroebel/python-djvulibre/blob/b6c68a3496a244403488034b30c8de4b935b02b5/examples/djvu2png and call it with
djvu2png --foreground ../tests/images/test1.djvu out.png
. With a regular pycairo installation, everything works fine. But as soon as I replaceimport cairo
withimport cairocffi as cairo
, I get an error:Simply removing the offending lines from the cairocffi source code at
cairocffi/cairocffi/surfaces.py
Lines 725 to 727 in f1984d6
The text was updated successfully, but these errors were encountered: