al_load_bitmap_f(3alleg5)

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

πŸ’– al_load_bitmap_f β€” Allegro 5 API πŸ’–

okay bestie, welcome to the al_load_bitmap_f(3alleg5) page, from the Allegro reference manual, no less. this is your girl explaining how to yeet an image out of a file stream and into a shiny new bitmap. let's go πŸ¦‹


✨ NAME ✨

al_load_bitmap_f β€” literally the Allegro 5 API, that's the whole name, slay πŸ’…


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

ALLEGRO_BITMAP *al_load_bitmap_f(ALLEGRO_FILE *fp, const char *ident)

✨ DESCRIPTION ✨

so what this does is: it loads an image from an ALLEGRO_FILE(3alleg5) stream and drops it into a brand new ALLEGRO_BITMAP(3alleg5). new bitmap, who dis πŸŽ€

the file type gets figured out by al_identify_bitmap_f(3alleg5). and if the identification just... isn't giving 😭 (not possible, bestie), then the ident parameter you passed in is used as a fallback β€” that's a file name extension including the leading dot, btw, so like .png energy β€” but only if it's not NULL. no NULL fallback, no backup plan. periodt.

this is the same as calling al_load_bitmap_flags_f(3alleg5) with 0 for the flags parameter. same vibes, fewer args.

it returns NULL on error. and the file stays open afterwards β€” so don't be out here closing it and then acting surprised, okay? πŸ™ˆ

Note: the core Allegro library does not support any image file formats by default. you must use the allegro_image addon, or register your own format handler. no addon, no images, no exceptions. it's giving empty plate at a potluck πŸ’€

🌈 SEE ALSO 🌈


okay that's the whole page, you ate it up fr fr πŸ’œ this was the al_load_bitmap_f(3alleg5) page straight out of the Allegro reference manual β€” go forth and load those bitmaps, bestie, you got this πŸ‘‘βœ¨

πŸ“¦ where this page comes from