On Tue, Oct 14, 2008 at 7:44 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I am wondering what I should do if I want to construct an image
> programatically from a set of other images. What I'm trying to do is
> create an image of a spaceship, given a series of images for each part
> (like an engine, cockpit, fuselage) that can be translated, rotated,
> scaled, etc. such that you could make a large number of different-
> looking ships with code. ...

I have an image padding function that looks like this:

def pad_image_edges(img):
    res = pyglet.image.create(img.width + 2, img.height + 2)
    res_tex = res.get_texture()
    res_tex.blit_into(img, 1, 1, 0)
    return res_tex.get_image_data()

You could try copying that style and see if it works.  But since the
error is with GL, it seems more likely that the problem is with
transferring data to and from a texture with your video card.  On my
video card, this pad_image_edges is very slow (it takes seconds to pad
100 images).  It is probably better to use PIL for image processing.
--
Nathan Whitehead

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