简体   繁体   English

从相机拍摄时如何获得清晰的图像?

[英]How to get clarity image when capture from camera?

camera捕获图像,然后转换为bitmap然后设置为图像视图,它看起来不佳,无法获得原始图像,使用滑行库将url图像路径设置为图像视图,我附加了从camera捕获图像的屏幕快照

Change Imageview code like this 像这样更改Imageview代码

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

Also, change Picasso code like this 另外,这样更改毕加索代码

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

Basically, you should not hardcode the height/width values. 基本上,您不应该对高度/宽度值进行硬编码。 It will change the image clarity. 它将改变图像的清晰度。

You must be getting the thumbnail in your onAcitityResult. 您必须在onAcitityResult中获取缩略图。 You need to get the original file path to load the image of good quality. 您需要获取原始文件路径才能加载高质量的图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从Android的Camera中捕获图像? - how to capture image from Camera in Android? 如何从相机捕获图像并上传到 Firebase - How to capture image from camera and upload to Firebase 用户捕获图像时,如何查看相机ID(主要或次要)在Android中当前打开了哪个相机? - How to check camera Id (primary or secondary) which camera is open currently in android when user capture an image? ARCORE 与 Camera2 共享相机时的图像捕获 API - Image capture when ARCORE sharing camera with Camera2 API 如何使用相机捕获图像并将其发送到Firebase - How to capture image using camera and send to firebase 如何在Android中捕获图像以及如何从图库中获取图像 - How to capture image and how to get image from gallery in android 使用ACTION_IMAGE_CAPTURE Intent时如何正确错误捕获Android相机活动 - How to properly error-catch Android camera activity when using the ACTION_IMAGE_CAPTURE Intent 使用意图从相机捕获图像创建空图像文件 - Capture Image From Camera using intent creates empty Image file 使用 ACTION_IMAGE_CAPTURE 从相机拍摄照片后如何跳过或避免“重拍和查看”选项 - How to skip or avoid 'retake and review' option after capturing photo from camera using ACTION_IMAGE_CAPTURE 如何从Android中的片段从相机获取图像 - How to get image from camera from fragment in Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM