图像显示pygame

图像显示pygame,第1张

import time

import airsim
import pygame

# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    pygame.init()
    screen = pygame.display.set_mode((320, 240))
    pygame.display.set_caption('keyboard ctrl @FPV')
    screen.fill((0, 0, 0))

    while True:
        # 利用pygame库加载保存的第一视角图像,
        screen_image = pygame.image.load("1.png")
        # 图像坐标系,左上角为(0, 0),在此放置图片
        screen.blit(screen_image, (0, 0))
        pygame.display.flip()
        pygame.display.update()
        time.sleep(1)

    print('PyCharm')

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/2989873.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-09-23
下一篇2022-09-23

发表评论

登录后才能评论

评论列表(0条)

    保存