On 17/12/12 10:41, Brian Will wrote:
For pedagogical purposes, I'm trying to set up a simple drawing canvas
on which to draw and display a single image with control of the
individual pixels. Efficiency is no concern. To this end, I have a
MutableImage class with getPixel and setPixel methods. Everything
seems to work fine, except when blitting the generated image, pixels
from columns on the left side for some reason also get displayed in
columns about 2/3 to the right, e.g. in a 500 pixel wide image, the
content of columns 0-100 gets erroneously drawn also in columns
~300-400 (overwriting whatever should be in those columns). My hack
around this is to save my generated image to file, then load it again
with pyglet.image.load. When I then blit my generated image newly
loaded from the file, it displays properly. So if my data is getting
saved properly, does this mean there's a bug in blitting images after
set_data?
p.s. I also get strange behavior in the saved .png. The generated
image displays correctly in my window, but the saved file doesn't
match, almost like a whole color channel is missing. Seems like
/something/ is screwy with the channels.
Hi,
Just so you get this fix as quickly as possible, changing FORMAT to
"RGBA" works for me. I think there might be some assumption about RGB ==
RGBA but I haven't checked yet.
HTH,
Adam.
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en.