-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
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 replace import cairo with import cairocffi as cairo, I get an error:
ValueError: Got a 3072 bytes buffer, needs at least 12288.
Simply removing the offending lines from the cairocffi source code at
cairocffi/cairocffi/surfaces.py
Lines 725 to 727 in f1984d6
| if length < stride * height: | |
| raise ValueError('Got a %d bytes buffer, needs at least %d.' | |
| % (length, stride * height)) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels