Quick answer: Install pygame-ce. Confirm support via pygame.image.get_extended().
Loading a PNG. pygame.error: File is not a Windows BMP file or extension not supported. Pygame build lacks SDL_image.
The Fix
# Uninstall stock pygame, install community edition
$ pip uninstall pygame
$ pip install pygame-ce
# In code: verify support
import pygame
assert pygame.image.get_extended() # True with pygame-ce
img = pygame.image.load("sprite.png").convert_alpha()
pygame-ce is a drop-in replacement that bundles SDL_image, SDL_mixer, and modern formats. Existing pygame imports continue to work.
Verifying
PNG, JPG, GIF all load. get_extended() returns True. Without pygame-ce: only BMP loads.
“pygame-ce. Extended formats. PNG loads.”
Related Issues
For HiDPI text, see HiDPI text. For mixer end event, see music end.
pygame-ce. PNG loads.