getr8 - Man Page

Extract a color component from the specified pixel format. Allegro game programming library.

Synopsis

#include <allegro.h>

int getr8(int c);

int getg8(int c);

int getb8(int c);

int getr15(int c);

int getg15(int c);

int getb15(int c);

int getr16(int c);

int getg16(int c);

int getb16(int c);

int getr24(int c);

int getg24(int c);

int getb24(int c);

int getr32(int c);

int getg32(int c);

int getb32(int c);

Description

Given a color in a display dependent format, these functions extract one  of the red, green, or blue components (ranging 0-255). Example:

   int r, g, b, color_value;
   
   color_value = _getpixel15(screen, 100, 100);
   r = getr15(color_value);
   g = getg15(color_value);
   b = getb15(color_value);

See Also

geta32(3), getr(3), getr_depth(3), makecol(3), set_color_depth(3)

Referenced By

geta32(3), getr(3), getr_depth(3).

The man pages getb15(3), getb16(3), getb24(3), getb32(3), getb8(3), getg15(3), getg16(3), getg24(3), getg32(3), getg8(3), getr15(3), getr16(3), getr24(3) and getr32(3) are aliases of getr8(3).

version 4.4.3 Allegro manual