BCH.BCHTool.FormatToBPP C# (CSharp) Method

FormatToBPP() public static method

public static FormatToBPP ( int format ) : double
format int
return double
        public static double FormatToBPP(int format)
        {
            switch (format)
            {
                case 0: //rgba8
                    return 4;
                case 1: //rgb8
                    return 3;
                case 2: //rgba5551
                case 3: //rgb565
                case 4: //rgba4
                case 5: //la8
                    return 2;
                case 6: //hilo8
                case 7: //l8
                case 8: //a8
                case 9: //la4
                    return 1;
                case 0xa: //l4
                    return 0.5;
                case 0xb: //ec1a4 (again?)
                    return 1;
                case 0xc: //etc1
                    return 8.0 / 16.0;
                case 0xd: //etc1a4
                    return 1;
                default:
                    return 0;
            }
        }