Picasso image gets rotated by itself

谁说我不能喝 提交于 2019-12-11 06:32:51

问题


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);

回答1:


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)




回答2:


It has nothing to do with Picasso. It is just mirror effect. It's not your app fault. Try other apps like WhatsApp , Facebook, etc on same device. It could be found only in some manufacturers device.

When we see our image in the mirror (or the front facing camera before clicking a selfie), it is flipped. Flipped in the sense that when we raise OUR LEFT hand, the image raises ITS RIGHT hand. So, how WE see OURSELVES in the mirror is not the way anyone else sees us.



来源:https://stackoverflow.com/questions/56894398/picasso-image-gets-rotated-by-itself

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!