al_registe...ap_saver_f(3)

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

πŸŽ€ NAME πŸŽ€

okay so this page is for al_register_bitmap_saver_f β€” Allegro 5 API β€” and it lives in the Library Functions Manual, with the header looking all abbreviated like al_registe...ap_saver_f(3) 🫢

✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

bool al_register_bitmap_saver_f(const char *extension,
   bool (*fs_saver)(ALLEGRO_FILE *fp, ALLEGRO_BITMAP *bmp))

πŸ’– DESCRIPTION πŸ’–

Bestie, this is how you register a handler for al_save_bitmap_f(3). The function you pass in gets used to handle saving bitmap files with the extension you give it. It’s giving β€œcustom save behavior, but make it official” ✨

The extension should include the leading dot (.) character. It will be matched case-insensitively β€” no cap.

The saver_f argument may be NULL to unregister an entry. Very β€œwe can unplug it whenever” energy πŸ’…

It returns true on success and false on error. Also, it returns false if you’re unregistering an entry that doesn’t exist.

bestie heads up: unregistering a thing that isn’t there is a false, not a dramatic success 😭

🌈 SEE ALSO 🌈


🫢 source/version: Allegro reference manual. Date: the footer on this copy doesn’t show one, so I’m not inventing it β€” periodt πŸ’€πŸ’…

πŸ“¦ 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