0
我试图从文件夹中加载图像。然后将它抹到0,0 我试图加载的路径是:“。\ media \ img \ bk \ spaceport.png”。 该脚本位于该文件夹的根目录中。 我使用Windows,如果该事项Pygame无法打开图像
sWIDTH = 800
sHEIGHT = 600
class IMGLOAD():
def BAK(ImageTobeUsed):
b1 = pygame.image.load(ImageTobeUsed)
background = pygame.transform.scale(b1,(sWIDTH, sHEIGHT))
window.blit(background,(0,0))
IMGLOAD.BAK(".\media\img\bk\bedroom.jpg")
仍然dosnt工作 – 2014-12-11 00:51:00
它以什么方式不起作用? – iCodez 2014-12-11 00:53:09
pygame.error:无法打开媒体\ img \ bd \ spaceport.png >>> – 2014-12-11 01:45:30