public static Orientation fromValue(int value) {
            switch (value) {
            case 1:
                return NORMAL;
            case 2:
                return NORMAL_FLIPPED;
            case 3:
                return NORMAL_ROTATED_180;
            case 4:
                return NORMAL_FLIPPED_ROTATED_180;
            case 5:
                return NORMAL_FLIPPED_ROTATED_CW90;
            case 6:
                return NORMAL_ROTATED_CCW90;
            case 7:
                return NORMAL_FLIPPED_ROTATED_CCW90;
            case 8:
                return NORMAL_ROTATED_CW90;
            case 9:
                return UNKNOWN;
            default:
                return null;
            }
        }