Answers for "how to set image size in python in pygame"

0

pygame size of image

image = pygame.image.load("path/to/file.png")  # load image

width, height = image.get_width(), image.get_height()  # get size
print(width, height)  # print size

"""
OUTPUT:
(50, 50)
"""
Posted by: Guest on January-03-2021

Code answers related to "how to set image size in python in pygame"

Python Answers by Framework

Browse Popular Code Answers by Language