al_load_bitmap_flags_f(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_load_bitmap_flags_f πŸ’–

okay so bestie, we're in the Allegro 5 API manual rn and this page is literally all about al_load_bitmap_flags_f. she's a function, she's iconic, she loads your pics, and honestly? she ate. πŸŽ€


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

ALLEGRO_BITMAP *al_load_bitmap_flags_f(ALLEGRO_FILE *fp,
   const char *ident, int flags)

🌸 DESCRIPTION 🌸

So what she does is: she loads an image out of an ALLEGRO_FILE stream (that's ALLEGRO_FILE(3alleg5), iykyk) and drops it into a brand new ALLEGRO_BITMAP (ALLEGRO_BITMAP(3alleg5)). new bitmap, new me, periodt. πŸ’…

How does she know what kind of file it is? al_identify_bitmap_f(3alleg5) handles the vibe check and figures out the file type. but if identification is just not possible (it happens, no shame), she falls back to the ident parameter you passed in β€” that's a file name extension including the leading dot β€” and she only uses it if it's not NULL. πŸ¦‹

the flags parameter? it's literally the exact same as for al_load_bitmap_flags(3alleg5). same flags, same energy.

if something goes wrong she returns NULL on error. 😭 and the file remains open afterwards β€” she does not close it, that's not her job, she's just borrowing it fr fr.

Note: the core Allegro library does not support any image file formats by default. πŸ’€ so you must use the allegro_image addon, or register your own format handler. there is no third option bestie, she said what she said.

⭐ SINCE ⭐

5.1.0 β€” an OG, been here since 5.1.0, we stan a consistent queen πŸ‘‘


🫢 SEE ALSO 🫢


Allegro reference manual Β· al_load_bitmap_flags_f(3alleg5) β€” mwah, that's the whole page bestie, go load some bitmaps and slay πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from