load_bmp(3)
β¨ load_bmp β¨
okay bestie, gather round, because this one is a little legend from the Allegro game programming library π (yes, that's the manual name, we're doing load_bmp(3) today, manifesting it)
πΈ SYNOPSIS πΈ
#include <allegro.h>
BITMAP *load_bmp(const char *filename, RGB *pal);
like, look at her. three lines. iconic. π
π¦ DESCRIPTION π¦
so what does she actually do?? she loads a BMP bitmap from a file. that's it, that's the whole vibe.
and not just any BMP either β she handles 8-bit, 16-bit, 24-bit and 32-bit BMP files, and she's chill with both Windows and OS/2 flavours. versatile queen fr fr πβ¨
π RETURN VALUE π
on a good day she hands you back a pointer to the bitmap π«Ά and on a bad day she gives you NULL and you have to deal with that emotionally. that's the error case, bestie, no cap.
β οΈ okay but listen, this part is IMPORTANT: you are responsible for destroying the bitmap when you're finished with it. not her. you. because otherwise you get a memory leak and leaks are giving π not cute. free your bitmaps, periodt.
π SEE ALSO π
go read those too, they're the girlies in the same friend group π
k byeeee, this was Allegro version 4.4.3 signing off** π stay slay, destroy your bitmaps, mwah π
π¦ 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