GIF library

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Gefa
Posts: 11
Joined: Wed Aug 13, 2008 8:31 pm
Location: Italy
Contact:

GIF library

Post by Gefa »

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 ... 253.0.html
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

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
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

http://forums.ps2dev.org/viewtopic.php?t=10005

Toward the bottom I post giflib and a version of the cursortest program showing how to load and display an anigif.
PosX100
Posts: 98
Joined: Wed Aug 15, 2007 1:02 am

Post by PosX100 »

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.
Post Reply