Im testing out blit() and i ran into this error:
Traceback (most recent call last):
File "/home/tom/Desktop/pygame/test/main.py", line 15, in <module>
screen.blit('image.jpg', (10,10))
TypeError: argument 1 must be pygame.Surface, not str
this is my code:
import pygame
pygame.init()
running = 1
while running == 1:
screen = pygame.display.set_mode((800, 600))
event = pygame.event.poll()
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = 0
image = pygame.image.load('image.jpg').convert()
screen.blit('image.jpg', (10,10))
screen.fill((0, 0, 0))
pygame.display.flip()
any ideas?