freeimage.h
FreeImage_GetBlueMask
16 24 32
DLL_API unsigned DLL_CALLCONV FreeImage_GetBlueMask(FIBITMAP *dib);
Devuelve un patrón de bits que describe el componente de color azul en un FIBITMAP, retorna 0 en caso contrario.
// this code assumes there is a bitmap loaded and // present in a variable called ‘dib’ unsigned red_mask, green_mask, blue_mask; red_mask = FreeImage_GetRedMask(dib); green_mask = FreeImage_GetGreenMask(dib); blue_mask = FreeImage_GetBlueMask(dib); if(FreeImage_GetBPP(dib) == 16) { if ((red_mask == FI16_565_RED_MASK) && (green_mask == FI16_565_GREEN_MASK) && (blue_mask == FI16_565_BLUE_MASK)) { // We are in RGB16 565 mode } else { // We are in RGB16 555 mode } }