protected static int NewBpc(int bpc) { switch (bpc) { case 1: case 2: case 4: break; case 3: return 4; default: return 8; } return bpc; }