问题描述
|
我正在尝试查找图像的大小,但未加载到内存中。我使用流动代码
BitmapFactory.Options o = new BitmapFactory.Options();
o.inJustDecodeBounds = true;
BitmapFactory.decodeResource(a.getResources(),R.drawable.icon,o);
int width1 = o.outWidt;
int height1 = o.outHeight;
现在,我进行一些比较:
Bitmap icon = BitmapFactory.decodeResource(a.getResources(),R.drawable.icon);
int width = icon.getWidth();
int height = icon.getHeight();
为什么width,height不等于width1和height1?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)