> Load an image using the default decoder, i.e. QuartzImageDecoder.
>     raw png data: '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x01,'
>     image data: 
> '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 
> 00\x00'
>
> Now remove the QuartzImageDecoder so we use the
> pyglet.image.codecs.png.PNGImageDecoder.
>     raw png data: '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x01,'
>     image data: 
> '\xff\xff\xff\x00\xff\xff\xff\x00\xff\xff\xff\x00\xff\xff\xff\x00\xff\xff\xff\x00'

The QuartzImageDecoder premultiplies the color components by their
alpha value during the decoding process.  Unfortunately, there doesn't
seem to be any alternative in cocoa to premultiplying alpha if you
also want to be able to handle image data that might not be in nice
formats.  The pixels that you are looking at have zero alpha value,
and so they become all zeros.  You should be able to still render the
image however.  What happens when you run

python image_display.py pyglet.png

in the pyglet/examples directory?

--phillip

-- 
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.

Reply via email to