Installing SDL_image

So far we have only been loading BMP image files. This is all that SDL supports without any extensions. We can use SDL_image to enable us to load many different image file types such as BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, and XV. First we will need to clone the latest build of SDL_image to ensure it will work with SDL 2.0:

  1. Open up the TortoiseHg workbench and use Ctrl + Shift + N to clone a new repository.
  2. The repository for SDL_image is listed on http://www.libsdl.org/projects/SDL_image/ and http://hg.libsdl.org/SDL_image/. So let's go ahead and type that into the Source box.
  3. Our destination will be a new directory, C:\SDL2_image. After typing this into the Destination box, hit clone and wait for it ...

Get SDL Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.