How To Get Pygame Image Location Within Frame

Viewed 11

Trying to get the coordinates of an image in pygame. I'm initializing it using

image = pygame.image.load('image.png')

and setting the location with

screen.blit(image, image.get_rect(center = screen.get_rect().center))

but when I call

print(bot_cropped.get_rect())

it seems to only reference the image pixels themselves. How do I find the initial x and y coordinates I sent it to? Referenced the following answers to no avail

How to get coordinates of image in pygame

Pygame Image position

0 Answers
Related