2 SDL_anigif: An example animated GIF image loading library for use with SDL
3 SDL_image Copyright (C) 1997-2006 Sam Lantinga
4 Animated GIF "derived work" Copyright (C) 2006 Doug McFadyen
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #include <SDL/begin_code.h>
34 SDL_Surface* surface; /* SDL surface for this frame */
35 int x, y; /* Frame offset position */
36 int disposal; /* Disposal code */
37 int delay; /* Frame delay in ms */
38 int user; /* User data (not used by aniGIF) */
41 #define AG_DISPOSE_NA 0 /* No disposal specified */
42 #define AG_DISPOSE_NONE 1 /* Do not dispose */
43 #define AG_DISPOSE_RESTORE_BACKGROUND 2 /* Restore to background */
44 #define AG_DISPOSE_RESTORE_PREVIOUS 3 /* Restore to previous */
48 extern DECLSPEC int AG_isGIF( SDL_RWops* src );
49 extern DECLSPEC int AG_LoadGIF( const char* file, AG_Frame* frames, int maxFrames );
50 extern DECLSPEC void AG_FreeSurfaces( AG_Frame* frames, int nFrames );
51 extern DECLSPEC int AG_ConvertSurfacesToDisplayFormat( AG_Frame* frames, int nFrames );
52 extern DECLSPEC int AG_NormalizeSurfacesToDisplayFormat( AG_Frame* frames, int nFrames );
53 extern DECLSPEC int AG_LoadGIF_RW( SDL_RWops* src, AG_Frame* frames, int size );
60 #include <SDL/close_code.h>
62 #endif /* _SDL_ANIGIF_H */