毕加索图像自行旋转 [英] Picasso image gets rotated by itself
本文介绍了毕加索图像自行旋转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在按以下方式使用Picasso库,但是当我拍摄图像并将其放入ImageView时,图像会旋转.我想知道是什么原因引起的?
I am using the Picasso library as follows, but when I take image and put into ImageView, image gets rotated. I wonder what might cause the issue?
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:id="@+id/imageViewUser"
android:background="@color/colorAccent"
android:contentDescription="@string/description" />
imageViewUser = (ImageView) findViewById(R.id.imageViewUser);
Picasso.get().load(url).placeholder(R.drawable.image)
.error(R.drawable.blank_profile)
.resize(100, 100)
.centerCrop()
.memoryPolicy(MemoryPolicy.NO_CACHE, MemoryPolicy.NO_STORE)
.networkPolicy(NetworkPolicy.NO_CACHE, NetworkPolicy.NO_STORE)
.into(imageViewUser);
推荐答案
有时在某些Samsung设备上会发生这种情况.一种方法是手动旋转所需的图像.了解更多从相机旋转的照片(SAMSUNG设备)
Sometimes it's happened on some Samsung devices. One way is to manually rotate the needed image. Read more Photo rotated from camera (SAMSUNG device)
这篇关于毕加索图像自行旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文