js代码:
Page({
isChooseImage () {
wx.chooseImage({
count: 3,
sizeType: ['compressed'], //TODO:去掉则表现正常
success: (res) => {
console.log(res.tempFilePaths); //上传gif图,打印结果为jpg图
}
})
}
})
|
wxml代码:
<view style="padding: 200rpx"> <button bind:tap="isChooseImage">选择图片</button> </view> |
测试机型:Redmi Note 7 Pro,该机型选择gif图片时,res.tempFilePaths的打印结果为jpg图片;去掉js代码中的sizeType: [‘compressed’], 则打印正常。
测试机型:iPhone 7 Plus,该机型表现正常。