Get color of individual pixels of images in pygame
问题 How can I get the colour values of pixels of an image that is blitted onto a pygame surface? Using Surface.get_at() only returns the color of the surface layer, not the image that has been blitted over it. 回答1: The method surface.get_at is fine. Here is an example showing the difference when blitting an image without alpha channel. import sys, pygame pygame.init() size = width, height = 320, 240 screen = pygame.display.set_mode(size) image = pygame.image.load("./img.bmp") image_rect = image