Thanks for the response.  I assume you mean specifying the 'encoder' kwarg
in AbstractImage.save() -- what encoder do I specify?  AFAIK, there's no
specific TGA encoder, and if I send it the PILImageEncoder I get the same
problem (since it has the file extensions in it).  If I create an instance
and override its get_file_extensions(), I get the same exception as before,
it looks like the problem happens somewhere in Image.save() since the
extension isn't registered?

On Thu, Oct 30, 2008 at 4:11 PM, Alex Holkner <[EMAIL PROTECTED]>wrote:

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