   Display animated gif file in SDL
  Hello,Is there an easier way to display a GIF animation in my SDL game? Instead of splitting the GIF in multiple BMP files.Thanks in advance,Victor Freire   
  You could find out how to load the animated gif file so you would have to find an article or file specification and load that.  Then you can probably create an SDL_Image and then use it that way.  It would probably be easier to just use an image editing program to split it into bmps and use SDL to load the images.   ;  I splitted all the animations in my game but it takes some time so I was looking for an easier way, the animation I want to add now has 33 frames.   ;  In short, there is no easier way avaliable. SDL_Image only supports the first frame of a GIF, so you will have to manually create each SDL_Surface for each frame, then store those, then setup your own playback system.   ;  Thanks, I already splitted them and I'm adding them to the game as I write here.   ;  Sorry for my ignorance, but why would one separate a gif file into multiple bmp files? Why not multiple gif or png files? Actually, the very existence of the bmp format in modern image manipulation programs has baffled me, so the answer to my question might reveal an answer to two questions.   ;Quote:Original post by MikhaSorry for my ignorance, but why would one separate a gif file into multiple bmp files? Why not multiple gif or png files? Actually, the very existence of the bmp format in modern image manipulation programs has baffled me, so the answer to my question might reveal an answer to two questions.Because when it comes down to it, for any compressed format, MP3, OGG, PNG, etc.. they are decompressed into some base format, wav, bmp, etc... to be used. Sure storing in PNG/GIF formats saves space, but increases the CPU consumption in terms of processing resources. The converse is true with BMPS, less CPU processing, but more space taken up. There's no 'better chocie' between the two, it just depends on what you are doing. If you have large files, and are distributing your game, PNG might work a bit better in the long run, but if they are smaller files, BMPS might actually prove faster. Now I do not know if that's necessarily true with how SDL works, but the similar concept is true with audio files, so it just depeds on the library being used as well.   ;  Actually the 'huge' increment on cpu usage would only happen when loading the file at the start of the game? And bmp images don't have transparency channels unlike pngs   