【问题标题】:Bitmaps from Gallery are blurred and jaggered画廊中的位图模糊且参差不齐
【发布时间】:2015-07-22 19:45:59
【问题描述】:

我目前正在开发一个应用程序,该应用程序要求用户从他们的图库中将照片上传到应用程序。

我已经研究了许多解决方案,包括提出自己的解决方案。但是,我无法弄清楚为什么 ImageView,接受最终的位图是模糊的,边缘是锯齿状的。

例如,我目前正在使用这个 SO 帖子(标记的答案):Quality problems when resizing an image at runtime 一起工作。

我正在测试的照片是在我的 LG G3 上拍摄的,所以质量非常清晰......如果有帮助的话。

【问题讨论】:

  • 你确定你没有得到缩略图而不是完整的图像?

标签: android image bitmap byte


【解决方案1】:

几个月前我也遇到过同样的问题。可能这就是您正在寻找的答案。试一试:

BitmapFactory.Options op = new BitmapFactory.Options();
op.inScaled = false;
Bitmap a = BitmapFactory.decodeFile(imgPath.getAbsolutePath(), op);

【讨论】:

    猜你喜欢
    • 2017-05-17
    • 1970-01-01
    • 1970-01-01
    • 2013-08-18
    • 2017-06-08
    • 1970-01-01
    • 2021-06-23
    • 1970-01-01
    • 2016-11-25
    相关资源
    最近更新 更多