Summary: | connonical pycairo/pygame example is broken | ||
---|---|---|---|
Product: | pycairo | Reporter: | damien morton <dmorton> |
Component: | general | Assignee: | Steve Chaplin <d74n5pohf9> |
Status: | RESOLVED NOTOURBUG | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://www.pygame.org/wiki/CairoPygame | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
damien morton
2008-04-22 05:59:02 UTC
The code used to work, and pycairo has not been changed to stop it working. It looks like pygame.image.frombuffer() used to accept readable buffers, and has been changed so it now only accepts character buffers. However, if you look at the Python/C API reference manual, section 10.7 "Buffer Object Structures" where it describes the bf_getcharbuffer slot: "... This notion of exporting the internal buffers as ``text'' is used to distinguish between objects that are binary in nature, and those which have character-based content. ..." The pycairo image data is binary, not text or character-based data, so in my opinion, the character buffer slot should not be used to read binary image data. I suggest opening a pygame bug report to request that pygame.image.frombuffer() stop reading binary image data as text-based characters. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.