手机拍照上传图片被旋转90度
发布于 6 年前 作者 xiayuan 10021 次浏览 来自 问答

问题:使用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 回复

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

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

欸。。。。。。

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

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

换个手机试试…

回到顶部