al_init_image_addon(3alleg5)

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

✨ 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