Android 图像算法处理

来源:互联网 发布:淘宝评价多久更新一次 编辑:程序博客网 时间:2024/06/05 15:54
/** Returns the drawable associated with the given id. */
private Drawable getResourceDrawable(Resources resources, int resId)
        throws NotFoundException {
    Drawable drawable = resources.getDrawable(resId);
    Log.e("Width:", "" + drawable.getIntrinsicWidth());
    Log.e("Height:", "" + drawable.getIntrinsicHeight());
    drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),
            drawable.getIntrinsicHeight());
    return drawable;
}
0 0