On 23/06/14 11:18, [email protected] wrote:
> On Mon, Jun 23, 2014 at 10:31:50AM +0100, "Juan J. Martínez" wrote:
>> Some work was done in tip regarding this issue, but I don't know if it's
>> completely fixed though (IIRC should be fine now, but I'm might be wrong).
>>
>> Could you give it a go with tip?
> 
> 
> I get the same result with tip:
> 
>>>> import pyglet
>>>> data = [1,2,3,4] * 10 * 10
>>>> a = pyglet.image.ImageData(10, 10, 'RGBA', data)
>>>> a.get_data('RGBA', 4)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "pyglet/image/__init__.py", line 721, in get_data
>     return self._convert(format, pitch)
>   File "pyglet/image/__init__.py", line 1008, in _convert
>     self._ensure_string_data()
>   File "pyglet/image/__init__.py", line 1075, in _ensure_string_data
>     memmove(buf, self._current_data, len(self._current_data))
> ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type
> 
> I'm not really an expert in any of this, so I don't know best practices,
> but this does seem sort of like bytearray() is the ideal type here.  I'd
> offer to work on a patch to do just that, but I'm not really 100% on the
> details of ctypes and OpenGL, so I'm worried I might break more than I fix.

I'll investigate, after a quick look the changes that were made in that
regard were related to tests mainly.

There's this one though:

https://code.google.com/p/pyglet/issues/detail?id=735

There are compatibility bits already in place so this shouldn't be too
difficult to fix.

Which Python 3 version are you using? Can you open a bug report?

>> Image design is not intuitive and what it needs mostly is documentation.
>> There's already a ticket about that:
>>
>> https://code.google.com/p/pyglet/issues/detail?id=743
>>
>> (btw, the guy creating that ticket could use some help!)
> 
> I created that ticket (I'm in the arduous process of moving to a different
> email address :-).  I just submitted a patch, but I'm not really sure it's
> enough.  Writing good programming guide docs is a lot harder than it looks.
> 

Hah, so it was you :) Thanks a lot for your help.

Regards,

Juan


-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to