From b28efa44dfd03890203aef39838acd2d0c9718f6 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Sat, 29 Dec 2018 02:12:28 +0100 Subject: [PATCH] Auto-rotate the image if EXIF provides Signed-off-by: Mario Danic --- .../java/com/nextcloud/talk/controllers/ChatController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java index d865cdc3a..b0f0c553c 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java @@ -52,6 +52,7 @@ import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler; import com.facebook.drawee.backends.pipeline.Fresco; import com.facebook.drawee.interfaces.DraweeController; import com.facebook.drawee.view.SimpleDraweeView; +import com.facebook.imagepipeline.common.RotationOptions; import com.facebook.imagepipeline.request.ImageRequest; import com.facebook.imagepipeline.request.ImageRequestBuilder; import com.nextcloud.talk.R; @@ -323,6 +324,7 @@ public class ChatController extends BaseController implements MessagesListAdapte public void loadImage(SimpleDraweeView imageView, String url) { ImageRequest request = ImageRequestBuilder.newBuilderWithSource(Uri.parse(url)) .setProgressiveRenderingEnabled(true) + .setRotationOptions(RotationOptions.autoRotate()) .disableDiskCache() .build();