手机拍照上传图片被旋转90度

发布于 7 年前作者 xiayuan10158 次浏览最后编辑 7 年前来自 ask

问题:使用wx.chooseImage,拍照上传图片在预览时 ,图片自动翻转90°。

设备:小米6

版本号:Android7.1.1

demo:

index.wxml:

<button catchtap=“fileImg”>获取图片</button>

<image style=“height:200rpx; width:200rpx;” src=“{{tempFilePaths}}” mode=“aspectFit”></image>

index.js:

var app = getApp()

Page({

  /**

   * 页面的初始数据

   */

  data: {

    tempFilePaths:‘’

  },

  fileImg: function(){

    var _this = this;

    wx.chooseImage({

      count:1,

      sizeType: [‘compressed’], 

      success: function(res) {

        console.log(res.tempFiles);

        _this.setData({

           tempFilePaths : res.tempFilePaths

        })

 

      },

    })

  }

})

4 回复
gongwei
gongwei1 楼6 年前

你好,不知道你那个问题解决了吗,用的也是小米的手机上传拍照的照片会自动旋转,图片不会,其他手机也不会

fang05
fang052 楼6 年前

我调试的时候可以换个手机,但总不能让用户也换手机。

欸。。。。。。

也也没有找到exif信息。不知道该怎么修改。

yongren
yongren3 楼6 年前

我也遇到这个问题了,不知道你解决了吗

lei87
lei874 楼5 年前

换个手机试试…