📜  加载图像 pygame - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:13.702000             🧑  作者: Mango

代码示例1
import pygame
from pygame.locals import*
img = pygame.image.load('clouds.bmp')

white = (255, 64, 64)
w = 640
h = 480
screen = pygame.display.set_mode((w, h))
screen.fill((white))
running = 1

while running:
    screen.fill((white))
    screen.blit(img,(0,0))
    pygame.display.flip()