Answers for "python display image on screen"

10

load images pygame

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()
Posted by: Guest on December-04-2020
0

python find image on screen

Make a list of IMGs that are to be drawn and get the wanted IMG at the correct index (DUH)

If you dont have a list of imgs and just drawing one then just use that IMG

There is also another way to get an IMG on the screen if you have to crop it, for that though
watch DafluffyPotato's video one Youtube called 'custom text system in Pygame'

Link: https://www.youtube.com/watch?v=Lh-cc5qzDqk
Posted by: Guest on March-15-2022
0

python look for image on screen

#THIS IS FOR PYGAME USERS
#List of images on the screen to be rendered
Images = [Image_1, Image_2, _Image_3]

for image in Images:
    if image == CONDITION or if image in Images:
        #Do something
Posted by: Guest on January-27-2022

Code answers related to "python display image on screen"

Python Answers by Framework

Browse Popular Code Answers by Language