0
내 파이 게임 코드파이 게임 우분투
bif="images.jpg"
mif="point.png"
import pygame, sys
from pygame.locals import *
pygame.init()
screen=pygame.display.set_mode((640,360),0,32)
background=pygame.image.load(bif).convert()
mouse_c=pygame.image.load(mif).convert_alpha()
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
screen.blit(background, (0,0))
오류 메시지
Traceback (most recent call last):
File "game.py", line 8, in <module>
background=pygame.image.load(bif).convert()
pygame.error: File is not a Windows BMP file
같은 코드가 다른 컴퓨터에서 작동하지만 내 컴퓨터에없는 일을하지에서 제대로 작동하지 않습니다.
하는 사람이 나를 내 우분투 시스템에서 다시 설치보다는 전체 Python을 제거 할 수있는 방법이 문제
를 해결하는 데 도움을 주시기 바랍니다 수 있습니다.
virtualenv 사용을 고려 했습니까? – Gevious
잘 png와 jpg 파일을로드 중입니다. 오류가있는 것은 당연합니다. –
'pygame.image.get_extended()'가'True'를 반환하는지 확인하십시오. 출처 : http://www.pygame.org/docs/ref/image.html#pygame.image.load –