al_register_bitmap_saver(3alleg5)

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

✨ al_register_bitmap_saver(3alleg5) ✨

okay bestie, welcome to the Allegro 5 API reference manual πŸ’– this one lives in section 3alleg5, and it's literally the page that teaches you how to teach Allegro how to save bitmaps. iconic behavior, no cap.


πŸŽ€ NAME πŸŽ€

al_register_bitmap_saver β€” Allegro 5 API


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro.h>

bool al_register_bitmap_saver(const char *extension,
   bool (*saver)(const char *filename, ALLEGRO_BITMAP *bmp))

πŸ’… DESCRIPTION πŸ’…

so the whole vibe here? you're registering a handler for al_save_bitmap(3alleg5). the function you hand over is the one that's gonna be doing the actual saving of bitmap files with that given extension. like, you're basically introducing Allegro to your girl and being like "she handles .png, trust me" 🫢

the extension should include the leading dot (.) character β€” yes, the dot, don't forget her, she matters πŸ’–. and it gets matched case-insensitively, so .PNG and .png are the same queen.

the saver argument may be NULL to unregister an entry. bye babe πŸ‘‹

returns true on success, false on error. also returns false if you try to unregister an entry that doesn't exist β€” like, girl, there's nothing there to remove 😭 not me trying to unregister a ghost.


🌈 SEE ALSO 🌈


and that's the whole page, bestie, periodt πŸ’…βœ¨ this was brought to you by the Allegro reference manual, al_register_bitmap_saver(3alleg5) β€” Allegro 5 API, section 3alleg5. go forth and save those bitmaps, you main character πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from