al_init_image_addon(3alleg5)
β¨ al_init_image_addon β¨
okay so bestie, we're in the Allegro 5 API manual and this little function is literally your β¨glow-upβ¨ moment for images π it's from the Allegro reference manual, and it's giving "let me open ALL the doors for you" energy π¦
πΈ SYNOPSIS πΈ
#include <allegro5/allegro_image.h>
bool al_init_image_addon(void)
π DESCRIPTION π
okay so what does it even do?? it initializes the image addon, periodt. and the way that it works is: it registers alllll the bitmap format handlers for al_load_bitmap(3alleg5), al_load_bitmap_f(3alleg5), al_save_bitmap(3alleg5), and al_save_bitmap_f(3alleg5). so like, once you call this, those functions actually know what they're doing π«Ά no cap.
now here's the tea on formats β β these ones are built into the Allegro image addon and are guaranteed to be available, like fr fr:
- BMP
- DDS
- PCX
- TGA
and every platform also supports JPEG and PNG via external dependencies π (iykyk, external deps can be a whole vibe).
other formats may be available depending on your operating system and whatever libraries you've got installed β but bestie, they are NOT guaranteed π do not assume they're universally available, because they're not. vibe check your platform first, okay?
π DDS lore (important!!) π
the DDS format is only supported to load from β like, loading only, no saving, we don't do that here π and even then, only if the DDS file contains textures compressed in the DXT1, DXT3, and DXT5 formats.
also note: when you load a DDS file, the created bitmap will always be a video bitmap, and it will have the pixel format matching the format in the file. that's just how it is, no notes π
β SEE ALSO β
and that's the whole page bestie π this was the Allegro reference manual, page al_init_image_addon(3alleg5), Allegro version 5 β slay, go init your addon, you got this πβ¨π§
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms