CropPresenter.java 文件源码

java
阅读 56 收藏 0 点赞 0 评论 0

项目:Watermark 作者:
private int calculateSampleSize(BitmapFactory.Options options) {
    int outHeight = options.outHeight;
    int outWidth = options.outWidth;
    int sampleSize = 1;
    int destHeight = 1000;
    int destWidth = 1000;
    if (outHeight > destHeight || outWidth > destHeight) {
        if (outHeight > outWidth) {
            sampleSize = outHeight / destHeight;
        } else {
            sampleSize = outWidth / destWidth;
        }
    }
    if (sampleSize < 1) {
        sampleSize = 1;
    }
    return sampleSize;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号