1register_bitmap_file_type(3) Allegro manual register_bitmap_file_type(3)
2
3
4
6 register_bitmap_file_type - Registers custom bitmap loading/saving
7 functions. Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 void register_bitmap_file_type(const char *ext, BITMAP *(*load)(const
14 char *filename, RGB *pal), int (*save)(const char *filename, BITMAP
15 *bmp, const RGB *pal));
16
18 Informs the load_bitmap() and save_bitmap() functions of a new file
19 type, providing routines to read and write images in this format
20 (either function may be NULL). The functions you supply must follow the
21 same prototype as load_bitmap() and save_bitmap(). Example:
22
23 BITMAP *load_dump(const char *filename, RGB *pal)
24 {
25 ...
26 }
27
28 int save_dump(const char *filename, BITMAP *bmp, const RGB *pal)
29 {
30 ...
31 }
32
33 register_bitmap_file_type("dump", load_dump, save_dump);
34
35
37 load_bitmap(3), save_bitmap(3)
38
39
40
41Allegro version 4.4.3 register_bitmap_file_type(3)