📄 readme.txt
字号:
GIF Loader/Saver Readme
by Paul Bartrum.
DESCRIPTION/FEATURES
Two routines for loading and saving GIF images.
They use exactly the same format as the built-in image loaders and
savers.
* Loads GIF87a and GIF89a images.
* Supports loading interlaced images.
* Saves GIF87a images.
REQUIREMENTS
DJGPP and Allegro 3.0 or later.
IMPORTANT
I've done a little research on finding out the Unisys and IBM patent
restrictions on the LZW compression format (which is used in both loading
and saving) and it seems the FSF (www.fsf.org) analysis of the wording of the
patent implies:
A license is only required if you write a for-profit program that PRODUCES
GIF images.
There is no license needed to write a program that DISPLAYS a GIF image.
BUGS/NON-FEATURES
* The save_gif() routine uses 2Mb of memory for a massive speed increase
(about 10x faster). Of course the memory is freed when it finishes saving,
so it shouldn't be a problem unless your program reserves heaps of memory
then calls save_gif().
* The save_gif() routine only saves GIF 87a images because there's no point
in saving 89a images - it doesn't use any of the new features.
INSTALLATION
METHOD 1
The simplest way is to include in each file that needs it:
#include "load_gif.c"
#include "save_gif.c"
and inside main():
register_bitmap_file_type("GIF", load_gif, save_gif);
METHOD 2
This involves altering allegro so be careful with this one and don't
do it if you don't know what you are doing.
This is correct as of Allegro 3.0.
1. Copy the load_gif.c and save_gif.c to the allegro\src directory.
2. Load the allegro makefile into a text editor, edit line 142
(starts with "OBJS =") and add load_gif.o and save_gif.o to the list.
3. Load readbmp.c (in allegro\src\), replace line 47 (contains
"{ NULL, NULL, NULL },") with:
"{ "gif", load_gif, save_gif }," (but without the speech marks).
4. Next load allegro.h (in allegro\) and add:
BITMAP *load_gif(char *filename, RGB *pal);
int save_gif(char *filename, BITMAP *bmp, RGB *pal);
anywhere in the file.
5. Finally remake allegro.
Now the gif routines are integrated into allegro. You can now load
GIFs with the example programs!
CONTACT
If you need help, find a bug, or have some advice to offer, contact me at:
pbartrum@geocities.com
My webpage is http://www.geocities.com/SiliconValley/Bay/8849/
COPYRIGHT
I'll trust you not to rip me or my cat off.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -