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

时间:2018-01-02 07:09:39

标签: java android

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

的捕获图像的附加屏幕截图

2 个答案:

答案 0 :(得分: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代码

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

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

答案 1 :(得分:0)

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