Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- from PIL import Image
- sprites = Image.open('sprites.data')
- pygameImage = pygame.image.fromstring(sprites.tostring(), (760, 166), 'RGB', False)
- background = pygame.Surface((800, 600))
- rect = pygame.Rect((0, 0, 150, 200))
- background.blit(pygameImage, (0, 0), rect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement