private Bitmap rotatingImage(int angle, Bitmap bitmap) {
        if (angle == 0) {
            return bitmap;
        }
        //rotate image
        Matrix matrix = new Matrix();
        matrix.postRotate(angle);

        //create a new image
        return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
    }
@param file file to compress.
@param maxsize the proximate max size for compression, not for the image with large ratio.
@return may be a little bigger than expected for performance.
boxing/src/main/java/com/bilibili/boxing/utils/ImageCompressor.java