【发布时间】:2018-06-07 04:38:58
【问题描述】:
我正在从 Android 手机的相机中捕捉图像并将其保存在图库中。当我从图库中加载图像时,生成的图像总是小于原始图像。谁能告诉我如何解决这个问题?
图库中的图片是:
从图库加载时android应用程序内部的图片是:
我正在使用以下代码将图像加载到 imageView 中:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 2;
final Bitmap capturedimage1 = BitmapFactory.decodeFile(uri, options);
BitmapDrawable ob = new BitmapDrawable(getResources(), capturedimage1);
//capturedImg is the imageView and capturedimage1 is the bitmap image loaded from gallery
capturedImg.setImageBitmap(capturedimage1);
【问题讨论】:
标签: android-camera android-imageview android-bitmap android-gallery