register_bitmap_file_type(3)
π register_bitmap_file_type(3) π
okay bestie, welcome to the Allegro manual β this one lives in the Allegro game programming library and it's literally about teaching your program a brand-new image format π
β¨ NAME β¨
register_bitmap_file_type β registers custom bitmap loading/saving functions. Allegro game programming library.
πΈ SYNOPSIS πΈ
#include <allegro.h>
void register_bitmap_file_type(const char *ext, BITMAP *(*load)(const
char *filename, RGB *pal), int (*save)(const char *filename, BITMAP
*bmp, const RGB *pal));
π¦ DESCRIPTION π¦
So basically, this function informs the load_bitmap() and save_bitmap() functions that a new file type exists, and hands them the routines to read and write images in that format. β¨ Either one of those functions may be NULL β no cap, that's allowed. π
The functions you supply must follow the same prototype as load_bitmap() and save_bitmap(). Here's the vibe:
BITMAP *load_dump(const char *filename, RGB *pal)
{
...
}
int save_dump(const char *filename, BITMAP *bmp, const RGB *pal)
{
...
}
register_bitmap_file_type("dump", load_dump, save_dump);
it's giving pluggable image codecs and honestly? iconic. π
π SEE ALSO π
mwah π that's the whole page, written for Allegro version 4.4.3 β yeah she's a little vintage but she ate, periodt. π«Άπ go register a file type bestie, you got this π§β¨
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms