安卓:位图从画廊加载在ImageView的旋转 [英] Android: Bitmaps loaded from gallery are rotated in ImageView

查看:139
本文介绍了安卓:位图从画廊加载在ImageView的旋转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我加载图像弗罗姆媒体库成位图,一切工作正常,除了那名用相机拍摄的,而拿着手机垂直,图片旋转,让我总是得到一个水平图像,即使它看起来垂直在画廊。 这是为什么和我怎么能正确地装入?

When I load an image frome the media gallery into a Bitmap, everything works fine, except that pictures that were shot with the camera while holding the phone vertically, are rotated so that I always get a horizontal picture even though it appears vertical in the gallery. Why is that and how can I load it correctly?

推荐答案

你看着影像的EXIF数据?它可能知道何时拍摄照片的相机的方位。

Have you looked at the EXIF data of the images? It may know the orientation of the camera when the picture was taken.

这篇关于安卓:位图从画廊加载在ImageView的旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆