Created
March 4, 2012 08:28
-
-
Save jamesadney/1971332 to your computer and use it in GitHub Desktop.
Load pyglet image from PIL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp_image = Image.open("picture.png") | |
raw_image = temp_image.tostring() | |
image = pyglet.image.ImageData(width, height, 'RGB', raw_image, pitch= -resized_x * 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my case this works: