if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
if (bpp < 8) bpp = 8;
// We handle 8-bit bitmaps ourselves using the colour cube, 12-bit
// visuals are not supported by GDK so we do these ourselves, too.
// 15-bit and 16-bit should actually work and 24-bit certainly does.
if ((bpp == 16) && (visual->red_mask != 0xf800)) bpp = 15;
if (bpp < 8) bpp = 8;
// We handle 8-bit bitmaps ourselves using the colour cube, 12-bit
// visuals are not supported by GDK so we do these ourselves, too.
// 15-bit and 16-bit should actually work and 24-bit certainly does.