al_convert_mask_to_alpha(3alleg5)

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

✨ al_convert_mask_to_alpha ✨

okay bestie, welcome to the Allegro 5 API manual page for al_convert_mask_to_alpha β€” yes it's a long name, yes it's worth it, come sit with me 🫢


🌸 NAME 🌸

al_convert_mask_to_alpha β€” the Allegro 5 API function that takes your magic pink situation and makes it transparent, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

void al_convert_mask_to_alpha(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR mask_color)

like. two args. one function. we love a simple signature ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” this function converts the given mask color into an alpha channel inside the bitmap. that's literally it, and it's iconic for it.

the vibe is: you've got one of those older 4.2-style bitmaps where the transparency was faked with a "magic pink" color, and you wanna bring it into the modern era as an alpha-ready bitmap. this is your girl for that. 🧚

no, seriously β€” that's the whole documented use case. legacy pink β†’ alpha. glow up complete. periodt.

🌈 SEE ALSO 🌈


and that's the whole page, fr fr. this was al_convert_mask_to_alpha(3alleg5) from the Allegro reference manual β€” the same manual name in the header and the footer, matching on both ends like a cute little pair of bows πŸŽ€ stay transparent (in the bitmap way) and go make something slay πŸ’–βœ¨

πŸ“¦ where this page comes from