安卓:位图从画廊加载在ImageView的旋转位图、画廊、加载、ImageView

由网友(亡鱼深海)分享简介:当我加载图像弗罗姆媒体库成位图,一切工作正常,除了那名用相机拍摄的,而拿着手机垂直,图片旋转,让我总是得到一个水平图像,即使它看起来垂直在画廊。这是为什么和我怎么能正确地装入?When I load an image frome the media gallery into a Bitmap, everything...

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

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.

阅读全文

相关推荐

最新文章