Lazy Foo' Productions


Extension Libraries and Loading Other Image Formats

Extension Libraries and Loading Other Image Formats screenshot

Last Updated: May 25th, 2024

SDL extension libraries allow you do things like load image files besides BMP, render TTF fonts, and play music. You can set up SDL_image to load PNG files, which can save you a lot of disk space. In this tutorial we'll be covering how to install SDL_image.
SDL itself is an extension library since it adds game and media functionality that doesn't come standard with your C++ compiler. As you're setting up your extension library, you'll realize it's nearly identical to installing SDL by itself. We'll be specifically installing SDL_image, but if you can install that extension library you should be able to install any of them.

After you set up SDL_image, we'll cover how to load a PNG with SDL.
Select Your Operating System
Setting up SDL Extension Libraries on Windows
Setting up SDL Extension Libraries on Windows
Setting up SDL Extension Libraries on Linux
Setting up SDL Extension Libraries on Linux
Setting up SDL Extension Libraries on Mac OS X Sonoma
Setting up SDL Extension Libraries on Mac OS X Sonoma