Android getting an image from gallery comes rotated

后端 未结 6 1281
闹比i
闹比i 2020-11-30 20:08

I am trying to let users select a profile picture from gallery. My issue is that some pictures come as rotated to the right.

I start the image picker like so:

<
6条回答
  •  攒了一身酷
    2020-11-30 21:06

    Using Picasso:

    Picasso.get().load("Your image path").into(Imageview);

    Picasso.with(this) is now replaced with

    Picasso.get()

    Picasso library : https://github.com/square/picasso

    Add : implementation 'com.squareup.picasso:picasso:2.71828' in build.gradle file

    Picasso will take care of image auto-rotation .

提交回复
热议问题