i want to convert a Pyglet.AbstractImage object to an PIL image for further manipulation here are my codes
from pyglet import image
from PIL import Image
pic = image.load('pic.jpg')
data = pic.get_data('RGB', pic.pitch)
im = Image.fromstring('RGB', (pic.width, pic.height), data)
im.show()
but the image shown went wrong. so how to convert an image from pyglet to PIL properly?