| View previous topic :: View next topic |
| Author |
Message |
Gefa
Joined: 13 Aug 2008 Posts: 12 Location: Italy
|
Posted: Fri Aug 22, 2008 11:17 pm Post subject: GIF library |
|
|
I need to use some animated GIF in my HB game written with OSLib, but I don't know how to do.
My question is: exist a library that allows me to implement animated GIF in my project?
tnx, and sorry for my bad english _________________ For my PSP project, visit my web site: www.gefa.altervista.org
PaintMIXER v2.6.0 released: http://www.neoflash.com/forum/index.php/topic,5253.0.html |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Sat Aug 23, 2008 12:14 am Post subject: |
|
|
| you can simply display the frames of the gif one after the other with a time gap between ofcourse. use any libraryable to display pictures |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
|
| Back to top |
|
 |
PosX100
Joined: 15 Aug 2007 Posts: 98
|
Posted: Sat Aug 23, 2008 4:33 am Post subject: |
|
|
There's no reason to use gif library.
There are 2 ways to create animations:
a)Create a large texture with all frames.
All textures must have the same width & height.
b)Just use simple image files(jpeg/png/tga/tga rle/anything), code a custom animation structure that will hold each texture.
Animating:
Increase frame time counter while its less than max frame time
Go to next texture if time counter reached max frame time
Render active texture
Calculating frame time :
time - last time + frame time counter. |
|
| Back to top |
|
 |
|