Animated GIFs |
Animated GIFs |
Torsten Giebl
Guest
|
Hello !
As Anim. GIFs need to be updated reguarly, your are on your own with them. I would split the Anim GIF into single BMPs or PNGs for example, then load them into an array and blit the bitmaps when necessary. The easiest is to do this in your main loop. CU |
|||||||||||||
|
Animated GIFs |
Philipp Lorenz
Guest
|
Yes, I had the same idea yesterday, but i am new with SDL! The compiler gave
me: d3launch.cpp:33: error: cannot convert ?int? to ?SDL_Surface [9]? in initialization d3launch.cpp: In function ?bool load_files()?: d3launch.cpp:217: error: expected primary-expression before ?]? token d3launch.cpp:134: error: too many arguments to function ?SDL_Surface* load_image(std::string)? d3launch.cpp:217: error: at this point in file d3launch.cpp: In function ?int main(int, char**)?: d3launch.cpp:445: error: expected primary-expression before ?]? token If you need the code, go to this link: http://intelcentino.in.funpic.de/upload/d3launch.cpp Thanks, P. Lorenz
|
|||||||||||||||
|
Animated GIFs |
Doug
Guest
|
In article <200704042006.37454.descent1 at gmx.net>, descent1 at gmx.net says...
I worked on this and I made a small animated gif library, very similar to SDL's image library. The project is not yet complete (lacks documentation and multiple OS support - only supports Win32 now), but all the source code is there for your animated gif enjoyment. You can download it at: http://bitbasher.net/SDL/SDL_anigif.zip I support compile options for VC6 and VS2005 under Win32. The code is pretty simple and *should* compile easy on other platforms/OS. The sample application is Win32-only as it actually uses Win32 calls. During development, I noticed that "not all animated gif files are created equal". That is, there are many strange and exotic ways to make an animated gif. I downloaded hundreds of them, and so far, all of them will work with this code - so far . It's important to determine (in your app) if you want the animated gif to be overlayed (on top of existing image data) or full frame (the size of the animated gif IS the surface size). You can optimize the display of the animated somewhat based on how you use them. Doug. |
|||||||||||||
|