简体   繁体   English

如何将全尺寸图像加载到imageview

[英]How to load full size image to imageview

I try to build the simple "cameraIntet" and load the full size image from that camera to imageview, i build the same code like the example from the documentation (at full size image documentation) https://developer.android.com/training/camera/photobasics 我尝试构建简单的“ cameraIntet”并将该摄像机的完整尺寸的图像加载到imageview,我构建了与文档(使用完整尺寸的图像文档)中的示例相同的代码https://developer.android.com/training /相机/ Photobasics

And this js my onActivityResult code 而这js我的onActivityResult代码

  Override fun onActivityResult(...){
         Super.onActivityResults(...)
          If(requestCode == 1){
                val bitmap = BitmapFactory.decodeFile(currentPhotoPath)
                Img_imageview.setImageBitmap(bitmap)
           }
     }

And when i run the code and then take the picture, imageview just blank and not showing the picture, 当我运行代码然后拍照时,imageview只是空白而不显示图片,

So, how to show the full size image to imageview? 那么,如何在imageview中显示完整尺寸的图像?

在此处输入图片说明在此处输入图片说明

您可能想尝试https://github.com/davemorrissey/subsampling-scale-image-view它可以处理非常大的图像。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM