private int[] getCompressDisplay(int width, int height) {
        int thumbWidth = width % 2 == 1 ? width + 1 : width;
        int thumbHeight = height % 2 == 1 ? height + 1 : height;
        int[] results = new int[]{thumbWidth, thumbHeight};

        width = thumbWidth > thumbHeight ? thumbHeight : thumbWidth;
        height = thumbWidth > thumbHeight ? thumbWidth : thumbHeight;
        float scale = (float) width / height;
        if (scale <= 1 && scale >= 0.5625) {
            if (height < 1664) {
                thumbWidth = width;
                thumbHeight = height;
            } else if (height >= 1664 && height < 4990) {
                thumbWidth = width / 2;
                thumbHeight = height / 2;
            } else if (height >= 4990 && height < 10240) {
                thumbWidth = width / 4;
                thumbHeight = height / 4;
            } else {
                int multiple = height / 1280 == 0 ? 1 : height / 1280;
                thumbWidth = width / multiple;
                thumbHeight = height / multiple;
            }
        } else if (scale <= 0.5625 && scale > 0.5) {
            if (height < 1280) {
                thumbWidth = width;
                thumbHeight = height;
            } else {
                int multiple = height / 1280 == 0 ? 1 : height / 1280;
                thumbWidth = width / multiple;
                thumbHeight = height / multiple;
            }
        } else {
            int multiple = (int) Math.ceil(height / (1280.0 / scale));
            thumbWidth = width / multiple;
            thumbHeight = height / multiple;
        }
        results[0] = thumbWidth;
        results[1] = thumbHeight;
        return results;
    }
@param width  must > 0
@param height must > 0
boxing/src/main/java/com/bilibili/boxing/utils/ImageCompressor.java