Search code examples
androidimageviewpicasso

ImageView image populated Upside Down


I am trying to populate an image in an ImageView using Picasso, but the image is populated upside down or rotated 90 degrees. Below is the code for populating the image. This is happening with one few images.

Picasso.with(context)
                    .load(NetworkConstants.IMAGE_PREFIX + flag.get(position).getFilePath())
                    .placeholder(R.drawable.img_placeholder)
                    .error(R.drawable.img_placeholder)
                    .resize(400, 400)
                    .centerInside()
                    .into(busines_img);

The outcome of this code is:

Only this picture is upside down.

Url For the Image

This same picture comes properly in IOS devices. Thank in Advance for you help.


Solution

  • Could be a bug because the image orientation is wrong in your photo EXIF. This snippet might help you: https://github.com/square/picasso/blob/c1d60eea6cf7116fa547e573d992794a7ba82414/picasso/src/main/java/com/squareup/picasso/FileBitmapHunter.java