prevent位图太大而不能上传到纹理机器人 [英] Prevent bitmap too large to be uploaded into a texture android
问题描述
我需要在画廊的形式全屏幕显示原始图像。对于拇指它将很好地工作,当我尝试以全屏显示与原始来源,图像将无法显示。在大多数情况下,如果图像分辨率大于2000那么它会显示错误的的位图太大而不能上传到纹理的Android
I need to display original image in full screen in gallery form. For thumb it will be work perfectly and when I try to display that image in full screen with original source it will not be able to display. In most cases if the image resolution is greater then 2000 then it will display error bitmap too large to be uploaded into a texture android.
我要prevent这一点,我有搜索谷歌,但没有得到这方面的任何答复。
I want to prevent this, I have search google but not getting any answer regarding this.
推荐答案
我碰到了同样的问题,并针对此问题的这里:
I came across the same problem and came up with a one liner solution for this problem here:
Picasso.with(context).load(new File(path/to/File)).fit().centerCrop().into(imageView);
这篇关于prevent位图太大而不能上传到纹理机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!