casillas
casillas

Reputation: 16803

Picasso image gets rotated by itself

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

Upvotes: 1

Views: 347

Answers (1)

Yaugen Slizh
Yaugen Slizh

Reputation: 121

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)

Upvotes: 1

Related Questions