al_get_pixel_size(3)
al_get_pixel_size(3) π¦β¨
okay so this page is from the Library Functions Manual, and it's the Allegro 5 API function al_get_pixel_size β it's giving byte-count clarity, main character energy, and honestly? slay. π
β¨ NAME β¨
al_get_pixel_size β Allegro 5 API. literally the function that returns how many bytes one pixel of a given format takes up. no cap. π«Ά
π SYNOPSIS π
#include <allegro5/allegro.h>
int al_get_pixel_size(int format)
π DESCRIPTION π
okay bestie, here's the tea: al_get_pixel_size returns the number of bytes that a pixel of the given format occupies. that's it, that's the vibe. β¨
but wait β for blocked pixel formats (e.g. compressed formats), this returns 0. so if your format is blocked/compressed, the answer is literally 0. periodt. π
π SEE ALSO π
kisses, bestie β source/version: Allegro reference manual; date: this page doesn't print one, so I'm not making one up ππ
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms