AL_REGISTER_BITMAP_LOADER(3)
π NAME π
al_register_bitmap_loader β literally the Allegro 5 API function that lets you teach Allegro how to load bitmaps, bestie β¨
Oh and hey, this page lives in the Library Functions Manual (the Allegro reference manual, to be exact) β welcome to the group chat π«Ά
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
bool al_register_bitmap_loader(const char *extension,
ALLEGRO_BITMAP *(*loader)(const char *filename, int flags))
π DESCRIPTION π
Okay so picture this: you're registering a handler for al_load_bitmap(3). That's the whole vibe. The function you hand over is the one that's gonna be used to handle the loading of bitmap files that have the extension you specified. Iconic, no cap π
About that extension β it **should include the leading dot (.') character**. Like, the dot is part of the fit, don't leave it at home. And when it gets matched? Case-insensitively, periodt. .PNGand.png` are the same girl to Allegro πΈ
Now the loader argument β plot twist β it may be NULL to unregister an entry. Yes bestie, passing nothing is a whole valid move. Unenroll that loader, it's giving graduation π
What does it return? Slay question:
- Returns
trueon success β - Returns
falseon error π - And specifically, it returns
falseif you're unregistering an entry that doesn't even exist. Can't unregister what was never registered, babe π
No hidden lore here β those are the actual returns, fr fr. Don't go assuming extra behaviour that isn't on this page π
π¦ SEE ALSO π¦
al_register_bitmap_saver(3)β the sibling that handles the saving side πal_register_bitmap_loader_f(3)β same energy,_fvariant β¨
π and that's the whole page π
Allegro reference manual β that's the source, and this iconic little entry is al_register_bitmap_loader(3). Mwah, go register some loaders, bestie ππβ
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms