Upon further inspection, it would appear my assumption that PIL could 
handle DXT1 was also flawed, and my original test DXT1 file had been 
overwritten with a PNG in an earlier test. Neither PIL nor Pillow can open 
any DDS image. My only pre-pyglet success came via a random file called 
DDSImageFile.py (which is what I used when i accidentally overwrote my DDS 
with a PNG).

My working solution is this:


image = pyglet.image.load(filename)
data = image.get_texture() \
    .get_image_data() \
    .get_data('RGBA', image.width*4)
image = Image.fromstring('RGBA', (image.width, image.height), data) \
    .resize((48, 64), resample=Image.ANTIALIAS)

On Friday, April 18, 2014 8:07:50 AM UTC-7, claudio canepa wrote:
>
>
>
>
> On Fri, Apr 18, 2014 at 8:04 AM, Gerald Thibault 
> <[email protected]<javascript:>
> > wrote:
>
>> After further testing, it seems pyglet can decode dds DXT1 and DXT5 dds 
>> files, while PIL will die when trying to open a DXT5. So back to square one 
>> hahaha.
>>
>>
>>
> Pillow is mostly PIL compatible but incorporated many bugfixes. Maybe you 
> can try it.
>
>
>

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