Load images using SDL_image, a SDL companion library able to load various image formats.
this(SDL2 sdl2, int flags = IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_TIF | IMG_INIT_WEBP);
Loads the SDL_image library.
SDL must be already initialized.
- Throws
- SDL2Exception on error.
SDL2Surface load(string path);
Load an image.
- Returns
- A SDL surface with loaded content.
- Throws
- SDL2Exception on error.