You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code causes an exception:
import pyglet
data = [1,2,3,4] * 10 * 10
a = pyglet.image.ImageData(10, 10, 'RGBA', data)
a.get_data('RGBA', 4)
The exception trace is:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/pyglet/image/__init__.py", line 701, in get_data
return self._convert(format, pitch)
File "/usr/lib/pymodules/python2.7/pyglet/image/__init__.py", line 986, in _convert
self._ensure_string_data()
File "/usr/lib/pymodules/python2.7/pyglet/image/__init__.py", line 1053, in _ensure_string_data
memmove(buf, self._current_data, len(self._current_data))
ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type
This behavior occurs using both the last stable version and tip, using Python
2.7.7 on 64-bit Linux (other platforms not tested).
Contrast this with:
import pyglet
data = 'abcd' * 10 * 10
a = pyglet.image.ImageData(10, 10, 'RGBA', data)
a.get_data('RGBA', 4)
Which does not result in an error.
Did not try to run it under Python 3 since the current tip of pyglet doesn't
appear to install successfully in Python 3.
Output of `python -m pyglet.info` is attached.
Original issue reported on code.google.com by [email protected] on 23 Jun 2014 at 10:51
Original issue reported on code.google.com by
[email protected]
on 23 Jun 2014 at 10:51Attachments:
The text was updated successfully, but these errors were encountered: