_getpixel(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– _getpixel(3) β€” the Allegro manual, but make it cute πŸ’–

okay bestie, welcome to the Allegro game programming library ✨ this one is all about the faster specific versions of getpixel(), and yes, they are iconic for exactly one reason: speed πŸ’…


✨ NAME ✨

_getpixel, _getpixel15, _getpixel16, _getpixel24, _getpixel32 β€” faster specific version of getpixel(). Allegro game programming library πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

int _getpixel(BITMAP *bmp, int x, int y);

int _getpixel15(BITMAP *bmp, int x, int y);

int _getpixel16(BITMAP *bmp, int x, int y);

int _getpixel24(BITMAP *bmp, int x, int y);

int _getpixel32(BITMAP *bmp, int x, int y);

πŸ¦‹ DESCRIPTION πŸ¦‹

so these are the faster inline versions of getpixel() for specific color depths, and that is literally the whole point of them πŸ’– they are giving β€œI know exactly what depth you are and I am not wasting a single clock cycle about it” energy ✨

but bestie, listen closely, because there are two things you absolutely cannot ignore:

  • These won't work in mode-X. no cap, not even a little bit πŸ’€
  • They don't do any clipping. like, zero. none. the clipping department is empty.

so you must make sure the point lies inside the bitmap. not near it, not β€œbasically inside,” inside inside. if you don't, that is on you, and the vibe check will fail in a way that is very much not slay 😭


πŸ’… RETURN VALUE πŸ’…

returns the value of the pixel in the color format you specified ✨ simple as that, queen πŸ‘‘


🌈 SEE ALSO 🌈

  • getpixel(3) β€” the regular one, for when you are not feeling specific πŸ’œ

and that's the whole page, bestie 🫢 this Allegro manual moment is from version 4.4.3, and the _getpixel(3) page itself is the date-stamped footer energy we are sending off with a little kiss πŸ˜˜πŸ’– mwah, go read getpixel(3) next, ily, bye βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from