get_image_formats() -> (str, str, ...)¶
Gets the formats supported by PySDL2 in the default installation.
load_image(fname : str[, enforce=None]) → sdl2.SDL_Surface¶
sdl2.SDL_Surfacefrom an image file.
This function makes use of the Python Imaging Library, if it is available on the target execution environment. The function will try to load the file via
sdl2first. If the file could not be loaded, it will try to load it via
You can force the function to use only one of them, by passing the enforce as either
This will call
sdl2.sdlimage.IMG_Init()implicitly with the default arguments, if the module is available and if
sdl2.SDL_LoadBMP()failed to load the image.