On 10/31/08, Brian Hook <[EMAIL PROTECTED]> wrote:
>
>  Is there a simple way to enable saving images in TGA format?  PIL
>  supports this, but it looks like the TGA image encoder plugin isn't
>  being imported by default.  It looks like I can edit pil.py directly,
>  but there are users with their own installations of Pyglet that
>  probably don't or can't have me overwrite files in their site-
>  packages.  Is there a non-invasive way to enable TGA encoding?

pyglet doesn't import any of PIL's encoders directly, it just uses
Image.save(file, format).  If the problem you're having is that the
.tga extension isn't listed in PILImageEncoder's get_file_extensions()
method, you can either monkey-patch this method, or pass the encoder
explicitly to the AbstractImage.save() method, to skip file extension
checking.

Alex.

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