位图在位图工厂中返回null值

时间:2016-11-20 14:28:42

标签: android bitmap

我的位图总是有空值,这是我的代码:

BitmapFactory.Options myOptions = new BitmapFactory.Options();
myOptions.InDither = true;
myOptions.InScaled = false;
myOptions.InPreferredConfig = Bitmap.Config.Argb8888;
myOptions.InPurgeable = true;

Resources Res = ApplicationContext.Resources;
Bitmap bitmap = BitmapFactory.DecodeResource(Res, Resource.Id.imageView1, myOption);

0 个答案:

没有答案