从相机捕捉时如何获得清晰的图像?

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

camera捕获图像然后转换为bitmap然后设置为图像视图,它看起来不太好,它没有获得原始图像,使用滑动库将url图像路径设置为图像视图,我附加了来自camera的捕获图像的屏幕截图

java android
2个回答
0
投票

像这样更改Imageview代码

    <ImageView android:id="@+id/postImage"
     android:layout_gravity="center" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:adjustViewBounds="true" />

另外,改变这样的毕加索代码

Picasso.with(context)
  .load(banner)
  .into(holder.bannerImag);

基本上,您不应该硬编码高度/宽度值。它会改变图像的清晰度。


0
投票

您必须在onActivityResult中获取缩略图。您需要获取原始文件路径以加载高质量的图像。

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