AL_REGISTER_BITMAP_LOADER(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… 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 true on success βœ…
  • Returns false on error πŸ’€
  • And specifically, it returns false if 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 πŸ¦‹


🌈 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