bitmap_color_depth3alleg
Returns the color depth of the specified bitmap. allegro game programming library.
Usage
#include <allegro.h>
int bitmap_color_depth(BITMAP *bmp);
Overview
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;
}
Releases
4 releases since Debian 3.1 (Sarge); the text changed 2 times.