al_get_pixel_format_bits(3alleg5)

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

πŸ’– al_get_pixel_format_bits πŸ’–

okay bestie, so you're reading the al_get_pixel_format_bits page from the Allegro 5 manual (that's the 3alleg5 section, iykyk) ✨


✨ NAME ✨

al_get_pixel_format_bits β€” literally the Allegro 5 API, that's the whole vibe 🌸


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

int al_get_pixel_format_bits(int format)

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: this function hands you back the number of bits that a pixel of the given format occupies πŸ’… like, how many bits is one lil pixel taking up in that format you passed in? it tells you. that's it, that's the whole job.

but wait β€” plot twist πŸ™ˆ if you're dealing with blocked pixel formats (think compressed formats, the fancy ones), it doesn't give you a number at all. it just returns 0. so if you get a zero back, no, nothing's broken, that's just how blocked formats do 😭


πŸ‘‘ SEE ALSO πŸ‘‘


that's the whole page, bestie, go forth and count your bits πŸ§šπŸ’œ

signing off from the Allegro reference manual β€” mwah, catch you on the next manpage πŸ’–πŸ«ΆπŸŒˆ

πŸ“¦ where this page comes from