I'm not quite sure how it could work. The decoders/encoders are actually part of the pyglet.image module. The pyglet.image.base basically scans in all available units from pyglet.image.codecs, depending on the platform. The pyglet.resource module simply loads in whatever images the pyglet.image module supports.
So, to make this work, you would need to have something like "pyglet.image.add_decoder", and then make sure you add your decoders module in before doing any pyglet.resource.reindex() calls. This all seems a little awkward to me, with the way things currently work. Maybe the image module could automatically check and load applicable modules from pyglet/image/codecs, without first having to define them in pyglet.image.base. This would mean developers could just copy in the appropriate module to this directory in their codebase, This wouldn't really work for projects that install pyglet from pip, however. On Tuesday, January 31, 2017 at 7:05:21 PM UTC+9, DXsmiley wrote: > > This sounds too niche to warrant including in pyglet itself. > > I think that Kale's point is interesting. Allowing third-party modules to > add additional decoders to pyglet.resource could be useful. > -- 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 pyglet-users+unsubscr...@googlegroups.com. To post to this group, send email to pyglet-users@googlegroups.com. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.