bitmap_color_depth (3) Linux Manual Page
bitmap_color_depth – Returns the color depth of the specified bitmap. Allegro game programming library.
Synopsis
#include <allegro.h> int bitmap_color_depth(BITMAP *bmp);
Description
Returns the color depth of the specified bitmap (8, 15, 16, 24, or 32). Example:
switch (bitmap_color_depth(screen)) {
case 8:
/* Access screen using optimized 8-bit code. */
break;
default:
/* Use generic slow functions. */
break;
}