Answers for "can I set the width and the height of an image 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 "can I set the width and the height of an image in pygame"

Python Answers by Framework

Browse Popular Code Answers by Language