ImageResizeUtil.java 文件源码

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

项目:ArtOfAndroid 作者:
public static Bitmap decodeBitmapFromResource(Resources res, int resId, int reqWidth, int reqHeight) {
    Options options = new Options();
    options.inJustDecodeBounds = true;
    BitmapFactory.decodeResource(res, resId, options);

    options.inSampleSize = calcInSampleSize(options, reqWidth, reqHeight);

    options.inJustDecodeBounds = false;
    return BitmapFactory.decodeResource(res, resId, options);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号