renevy
renevy
  • 发布:2021-05-11 10:40
  • 更新:2022-08-05 19:46
  • 阅读:872

【报Bug】app应用使用uni.getImageInfo获取照片信息长和宽相反问题(纵向照片长宽相反,横向长宽正确 小米10和1+8)

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10

HBuilderX类型: 正式

HBuilderX版本号: 3.1.12

手机系统: Android

手机系统版本号: Android 10

手机厂商: 小米

手机机型: Mi10、1+8等

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
uni.getImageInfo({  
                        src: url,  
                        success: (res) => {  
                            // #ifdef H5  
                            const {width,height,path} = res  
                            resolve({width,height,path})  
                            // #endif  

                            // #ifdef MP-WEIXIN || APP-PLUS  
                            const {width,height,path,type} = res  
                            resolve({width,height,path,type})  
                            console.log('res:'+res)  
                            console.log('orientation:'+res.orientation)  
                            console.log('width:'+res.width)  
                            console.log('height'+res.height)  
                            // #endif  
                        },  
                        fail: (error) => {  
                            reject(error)  
                        }  
                    })

操作步骤:

小米10竖直拍照,uni.getImageInfo获取图片长宽。

预期结果:

图片信息结果,长宽相反。

实际结果:

结果符合预期。

bug描述:

  1. 使用小米10和1+8纵向垂直拍照,App应用使用uni.getImageInfo获取照片信息,照片方向是正常的,但是width和height是相反的。
  2. 横向拍照,照片方向是正常的,width和height也正常。

所以 无法判断照片的长和宽是对的,还是相反的, 无法正确二次编辑保存照片.

2021-05-11 10:40 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

同样的问题,怎么都没人回答

a***@yiquhudong.com

a***@yiquhudong.com

到现在居然还有这个问题

  • 1***@qq.com

    到现在还有这个问题哈哈哈哈

    2023-03-28 23:42

要回复问题请先登录注册