I can't load an image with Pygame, I've called pygame.image.get_extended and it returns false, is there any way I can fix this? What's even stranger, is that it was working earlier today. I don't remember doing anything to Python, Pygame, or OS X.

Edited by mordicaii: n/a

7 Years
Discussion Span
Last Post by vegaseat

Since we don't know what your code looks like, try this image load and display test code and see if it works ...

# experiments with module pygame
# free from: http://www.pygame.org/
# load and display an image using pygame

import pygame as pg

# initialize pygame

# pick an image you have (.bmp  .jpg  .png  .gif)
# if the image file is not in the working folder,
# use the full pathname 
# in Unix file names are case sensitive
image_file = "Pooh.gif"

# RGB color tuple used by pygame
white = (255, 255, 255)

# create a 300x300 white screen
screen = pg.display.set_mode((300,300),  pg.RESIZABLE )

# load the image from a file
image = pg.image.load(image_file)

# draw image, position the image ulc at x=50, y=20
screen.blit(image, (50, 20))

# nothing gets displayed until one updates the screen

# start the event loop and wait until
# the user clicks on the window corner x
while True:
    for event in pg.event.get():
        if event.type == pg.QUIT:
            raise SystemExit

Edited by vegaseat: s

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.