load_bmp(3alleg4)
β¨ NAME β¨
okay so bestie, welcome to load_bmp β she loads a BMP bitmap from a file π and yes she's part of the Allegro game programming library, we stan.
π SYNOPSIS π
#include <allegro.h>
BITMAP *load_bmp(const char *filename, RGB *pal);
like, that's it. two lines. iconic behavior honestly.
π¦ DESCRIPTION π¦
load_bmp pulls in an 8-bit, 16-bit, 24-bit or 32-bit BMP file β and not just any BMP, we're talking Windows or OS/2 flavor π
. she does not discriminate, she simply eats.
π RETURN VALUE π
- she hands you back a pointer to the bitmap π«Ά
- or
NULLif something went wrong π (error vibes, we hate to see it)
β οΈ okay so listen, this is the important part and I need you to hear me: you are responsible for destroying the bitmap when you're done with it. that's your job, not hers. if you just walk away and leave her hanging, that's a memory leak π and nobody wants that. clean up after yourself, bestie. periodt.
πΈ SEE ALSO πΈ
go read those too, they're literally her siblings π§
and that's the whole page babes β¨ this was the load_bmp entry from the Allegro manual, version 4.4.3, and yeah the footer said load_bmp(3alleg4) again because they love a little encore π mwah, go write some games π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms