当我在Android应用程序中从库中加载图像时,为什么位图会返回较小的图像?

问题描述 投票:0回答:1

我正在从Android手机的相机捕捉图像并将其保存在图库中。当我从图库加载图像时,生成的图像总是小于原始图像。谁能告诉我如何解决这个问题?

画廊中的图片是:

picture loaded from gallery

从库中加载时,android应用程序内的图片是:

image loaded from gallery

我使用以下代码将图像加载到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
1个回答
0
投票

因为你选择qazxsw poi。

© www.soinside.com 2019 - 2024. All rights reserved.