[try Beta version]
Not logged in

 
How to load PNG images in SDL?

Apr 11, 2013 at 9:44pm
I tried googling it and suprisingly nothing useful comes up. I can upload BMP images using the IMG_LoadBMP function. I assumed SDL_LoadPNG would work but according to VC++, 'SDL_LoadPNG identifier not found'. Any help would be appreciated!
Last edited on Apr 11, 2013 at 9:55pm
Apr 11, 2013 at 9:50pm
closed account (3CXz8vqX)
Google Lazyfoo
Apr 11, 2013 at 9:57pm
You need SDL_image, a separate library. I support the suggestion above.
Last edited on Apr 11, 2013 at 9:57pm
Apr 12, 2013 at 1:09am
Aha, thanks, tutorial 3 is just what I was looking for. :)
Apr 12, 2013 at 2:05am
Yep, instead of SDL_LoadBMP("some.bmp"); it's SDL_LoadIMG("some.png");
Apr 12, 2013 at 2:21am
closed account (3CXz8vqX)
or "some.gif" and so on...
Topic archived. No new replies allowed.